I'm not sure why, but in the regexp matcher I'm using I have [] around the
last slash, so try:
<map:match type="regexp" pattern="foo/(.*)/(.*)[/]?">

Those cases _should_ be equivalent but mine's working and yours isn't.  I
don't remember if I did that to make the conditional match more clear at a
glance or because it didn't work without it.  I don't know which regexp
engine is being used under the covers - maybe it has some
bugs/idiosyncrasies, or has different opinions about regexp syntax than we
seem to have. ;)

HTH,
Geoff Howard

> -----Original Message-----
> From: John R. Daily [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 08, 2003 11:06 AM
> To: [EMAIL PROTECTED]
> Subject: Regexp matching
>
>
> I have a path that I'm matching with wildcards as:
>
>     <map:match pattern="foo/*/*">
>
> Unfortunately, that doesn't match if another / is appended, so I
> switched to regexp matching:
>
>     <map:match type="regexp" pattern="foo/(.*)/(.*)/?">
>
> ...which still doesn't work if a / is appended.
>
> I can't find any useful documentation on the regexp matching.  Am
> I doing something wrong?  Is there a way to do this with wildcard
> matching?
>
> --
> John R. Daily                                        [EMAIL PROTECTED]
> Director of Technology                            Progeny Linux Systems
>                     Master of the ephemeral epiphany
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to