In message <[EMAIL PROTECTED]>, "Rami Ojares" writes: >The problem with having a generic interface for different regex implementation >s >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. org.apache.oro.io.RegexFilenameFilter 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 >in >jdk 1.4. What would be needed is a separate package that would implement jdk 1 >.4 >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 discussed. daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]