With JDBC you have a common language, SQL. Unless you're saying you pick the Java regex language as the standard and adapt to the others, you would have to come up with (or choose) another regex language. My point is that creating a facade (a la commons-logging or slf4j) for regex would be troublesome because you have to support the same exact regex regardless of the underlying implementation and that would most likely involve some translation, since the regex libraries out there do not support the same syntax. Merely coming up with the API is not difficult at all. Perhaps you did not mean to provide a general purpose façade, but only one that supports the two libraries in question (assuming this other library supports Java regex)?
On Monday, February 2, 2015, Gary Gregory <garydgreg...@gmail.com> wrote: > On Sun, Feb 1, 2015 at 5:35 PM, James Carman <ja...@carmanconsulting.com > <javascript:;>> > wrote: > > > To be clear, I am not advocating this approach. I was merely trying to > > illustrate what a nightmare such an endeavor would be. :) > > > > On Sunday, February 1, 2015, James Carman <ja...@carmanconsulting.com > <javascript:;>> > > wrote: > > > > > You would basically have to pick a canonical regex language if you > want a > > > facade and be able to swap the regex library out. Most of them are > very > > > similar but they are not the same. > > > > I would not need a canonical regex language. This could be like JDBC where > implementations vary. > > Gary > > > > > > On Sunday, February 1, 2015, Gary Gregory <garydgreg...@gmail.com > <javascript:;> > > > <javascript:_e(%7B%7D,'cvml','garydgreg...@gmail.com <javascript:;>');>> > wrote: > > > > > >> I think we'll need some clear performance advantages documented as > well > > as > > >> any compatibility issues. > > >> > > >> This begs for a facade API IMO. I would not want to recode my app just > > to > > >> test one vs. the other, it should be pluggable. > > >> > > >> Gary > > >> > > >> On Sat, Jan 31, 2015 at 10:58 AM, Benson Margulies < > > bimargul...@gmail.com <javascript:;> > > >> > > > >> wrote: > > >> > > >> > So, once upon a time, there was a regex library here. It was > retired, > > >> > presumably on the grounds that it was rendered obsolete by the JRE's > > >> > native support. > > >> > > > >> > However, the JRE's regular expressions have a pretty severe problem; > > >> > they have unbounded (or at least, very, very, bad) execution time > for > > >> > some combinations of data and regex. > > >> > > > >> > To cope with this, we ported the Henry Spencer regular expression > > >> > library (as found in TCL) from C to Java. > > >> > > > >> > Thus: https://github.com/basis-technology-corp/tcl-regex-java > > >> > > > >> > Is anyone interested in this? Give or take the possible IP muddle of > > >> > the original C Code, I could grant it easily. > > >> > > > >> > > --------------------------------------------------------------------- > > >> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > <javascript:;> > > >> > For additional commands, e-mail: dev-h...@commons.apache.org > <javascript:;> > > >> > > > >> > > > >> > > >> > > >> -- > > >> E-Mail: garydgreg...@gmail.com <javascript:;> | ggreg...@apache.org > <javascript:;> > > >> Java Persistence with Hibernate, Second Edition > > >> <http://www.manning.com/bauer3/> > > >> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> > > >> Spring Batch in Action <http://www.manning.com/templier/> > > >> Blog: http://garygregory.wordpress.com > > >> Home: http://garygregory.com/ > > >> Tweet! http://twitter.com/GaryGregory > > >> > > > > > > > > > -- > E-Mail: garydgreg...@gmail.com <javascript:;> | ggreg...@apache.org > <javascript:;> > Java Persistence with Hibernate, Second Edition > <http://www.manning.com/bauer3/> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> > Spring Batch in Action <http://www.manning.com/templier/> > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory >