commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <>
Subject Re: [vfs][all][poll]regular expression library or jdk1.4 as minimum requirement
Date Thu, 17 Jun 2004 20:22:11 GMT

In message <dvig9yjw.yvenf2n834hs@E0105301>, "Rami Ojares" writes:
>The problem with having a generic interface for different regex implementation
>is that the syntax and semantics of regexes are different. I want to know
>EXACTLY what my regexes match and what constucts/syntax I can use.

Somehow I missed this message.  Sorry for the belated response.
There are different use cases.  What you say is absolutely right
for the case where you're coding to a regex API and using those
expressions directly in your code.  But when you are dynamically
fetching expressions, for example from a user interface dialog,
it doesn't matter.  You can specify what syntax is required for
the input.  Also, when you're writing generic/reusable code it's
of great help.  For example, all of the split and substitute methods
in the org.apache.oro.text.regex.Util will work independent of the
regex syntax used. will work
with any regex engine.  There are plenty of cases where you're writing
regular expression code that is not dependent on the specific syntax.
For those cases, having generic engines is very useful.

>The best candidate in my humble opinion for regex language is the one defined 
>jdk 1.4. What would be needed is a separate package that would implement jdk 1
>regex lang and could be used together with older jdk's.

That would be a waste of effort in my opinion.  Other than glob expressions,
there is already a set of syntax common to most pattern matching languages.
Since the whole point of the VFS discussion appears to be to support
users who aren't using J2SE 1.4, all you have to do is use the syntax
subset shared by Perl5 and java.util.regex, which is rather rich and
useful.  Anyway, that's my take given my understanding of what's being


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message