Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 11074 invoked from network); 17 Jun 2004 20:22:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Jun 2004 20:22:49 -0000 Received: (qmail 57471 invoked by uid 500); 17 Jun 2004 20:22:44 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 57319 invoked by uid 500); 17 Jun 2004 20:22:43 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 57130 invoked by uid 99); 17 Jun 2004 20:22:41 -0000 Received: from [204.91.10.133] (HELO savarese.org) (204.91.10.133) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 17 Jun 2004 13:22:41 -0700 Received: from mail.savarese.org (mail2.savarese.org [192.168.2.5]) by savarese.org (8.12.11/8.12.11) with ESMTP id i5HKM6xb012460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 17 Jun 2004 16:22:06 -0400 Received: from yoda.savarese.org (yoda.savarese.org [192.168.1.4]) by mail.savarese.org (8.12.10/8.12.10) with ESMTP id i5HKMCNA026955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 17 Jun 2004 16:22:12 -0400 Received: from savarese.org by yoda.savarese.org (8.12.10/8.12.10/Submit) with ESMTP id i5HKMB6a010529 for ; Thu, 17 Jun 2004 16:22:12 -0400 Message-Id: <200406172022.i5HKMB6a010529@yoda.savarese.org> X-Mailer: exmh version 2.5 10/15/1999 with nmh-1.0.4 To: commons-dev@jakarta.apache.org Subject: Re: [vfs][all][poll]regular expression library or jdk1.4 as minimum requirement In-reply-to: Your message of "Tue, 15 Jun 2004 23:08:35 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 17 Jun 2004 16:22:11 -0400 From: "Daniel F. Savarese" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N In message , "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: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org