-----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-----

Reply via email to