Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 67920 invoked from network); 23 Jun 2006 22:35:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Jun 2006 22:35:20 -0000 Received: (qmail 95457 invoked by uid 500); 23 Jun 2006 22:35:18 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 95368 invoked by uid 500); 23 Jun 2006 22:35:18 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 95357 invoked by uid 99); 23 Jun 2006 22:35:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jun 2006 15:35:18 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [62.2.95.247] (HELO smtp.hispeed.ch) (62.2.95.247) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jun 2006 15:35:17 -0700 Received: from pati.ch (80-219-16-137.dclient.hispeed.ch [80.219.16.137]) by smtp.hispeed.ch (8.12.11.20060308/8.12.6/taifun-1.0) with ESMTP id k5NMYtK7001016 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Sat, 24 Jun 2006 00:34:55 +0200 Received: (qmail 7935 invoked from network); 24 Jun 2006 00:34:55 +0200 Received: from 10.20.30.1 by simba (envelope-from , uid 201) with qmail-scanner-2.01st (clamdscan: 0.88.2/1561. perlscan: 2.01st. Clear:RC:1(10.20.30.1):. Processed in 0.056124 secs); 23 Jun 2006 22:34:55 -0000 Received: from simba.pati.ch (HELO localhost) (10.20.30.1) by simba.pati.ch with (DHE-RSA-AES256-SHA encrypted) SMTP; 24 Jun 2006 00:34:55 +0200 Date: Sat, 24 Jun 2006 00:34:46 +0200 (CEST) From: Giacomo Pati Sender: giacomo@lapgp.otego.com To: dev@cocoon.apache.org Subject: Re: svn commit: r416308 - /cocoon/trunk/core/cocoon-core/src/test/java/org/apach In-Reply-To: Message-ID: References: X-GPG-FINGRPRINT: 9E66 40E0 0A9C B37F E29E 5816 2CD7 49BD 98E3 5590 X-GPG-PUBLIC_KEY: http://pks.gpg.cz:11371/pks/lookup?op=get&search=0x2CD749BD98E35590 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on smtp-01.tornado.cablecom.ch X-Virus-Status: Clean X-DCC-spamcheck-02.tornado.cablecom.ch-Metrics: smtp-01.tornado.cablecom.ch 1378; Body=1 Fuz1=1 Fuz2=1 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> Ok, looking at those matching sample we need to define how matching is >> suppose to work. Consider the following sample >> >> Pattern String >> **/*/** foo/bar/baz/buz/ >> >> What is the result you expect for {1}, {2}, and {3} ? Possible values could >> be: >> >> {1}="foo" {2}="bar" {3}="baz/buz" >> {1}="foo/bar" {2}="baz" {3}="buz" >> {1}="foo/bar/baz" {2}="buz" {3}="" >> >> which one do you think is the correct one? > > If it were the regex (.*)/([^/]*)/(.*) then what would the result be? Unless > there's a compelling reason not to, it might as well behave similarly. I > can't test it myself right now, but I think that regex would give the third > option (i.e. as greedy as possible as early as it can be). Yes, greedy regexp would give the third option. The WildcardMatcherHelper will give the 1. option as the algorithm used is not greedy. > However, if in fact that's not the case, shouldn't {3} include the trailing > slash? Yes, you are right. - -- Giacomo Pati Otego AG, Switzerland - http://www.otego.com Orixo, the XML business alliance - http://www.orixo.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFEnGyOLNdJvZjjVZARApTRAJ0QKNvUqdci+qMQvOWzIC+hJMptZwCg2dcs mwZr11HpPBc6VHE/vBzqv2I= =Oq2K -----END PGP SIGNATURE-----