Yes thank you for that point:

"... but as much as necessary to make the whole pattern succeed."

In fact what I want to match is something like that:
temp/foo/
temp/foo/index.html

and I find the solution with wildcard:

<map:match type="wildcard" pattern="temp/*/>
and 
<map:match type="wildcard" pattern="temp/*/index.html>


..but after what you said I did:
<map:match type="regexp" pattern="^temp/([^/]+)/(index.html)?$">



-----Message d'origine-----
De : Alfred Nathaniel [mailto:[EMAIL PROTECTED] 
Envoyé : 1 août 2007 20:08
À : [email protected]
Objet : Re: regexpUriMatcher

On Wed, 2007-08-01 at 12:22 -0400, Boissé Denis wrote:
> Hi,
> 
>  
> 
> I have Cocoon version 2.1.10
> 
>  
> 
> Do regexpUriMatcher work with Ungreedy Matching:
> 
> Example: <map:match type="regexp" pattern="^temp/(.*?)/$">   
> 
>  
> 
> Usually ungreedy matcher are in a form (.*?)  and suppose to match
> something like temp/hello/ or temp/hi/ 
> 
> but not matching something like temp/hello/dir/  (that's what happen
> to me)

Ungreedy means that it should match as little as possible but as much as
necessary to make the whole pattern succeed.

What you apparently want to achieve is pattern="^temp/[^/]+/$", or even
simpler <map:match type="wildcard" pattern="temp/*/"/>.

HTH, Alfred.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to