|
Boost Users : |
From: John Maddock (john_maddock_at_[hidden])
Date: 2003-08-08 05:16:53
> Search in the folowing strings (see below) using expression like:
> /exchange/test/(?!Drafts)/a.EML/b.png fails
> /exchange/test/Drafts/a.EML/b.gif
> /exchange/test/Inbox/a.EML/b.png
> /exchange/test/Inbox/a.EML/b.gif
> /exchange/test/Drafts/a.EML/b.png
>
> At the same moment I can suceesfully search using the expression:
> /exchange/test/Inbox/a.EML/b.(?!png).
Remember that a lookahead assertion doesn't consume any characters, so for
your expression to match it would have to find a string:
/exchange/test//a.EML/b.png
To do what you want, add a [^/]+ after the assertion:
/exchange/test/(?!Drafts)[^/]+/a.EML/b.png
Regards,
John Maddock
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net