| Posted: 10 October 2008 at 1:50pm | IP Logged
|
|
|
Greetings,
I am hoping that somone can help me with a regex for a rule that has been driving me crazy. The requirement for the rule is simple. Assume that there is a page called result.aspx. What I am trying to do is find a match for any time that result.aspx is present in the URL and is not immediately following a specific folder. Assume that result.aspx should live in a folder called "/search/".
So, for example:
/search/result.aspx (no match) /anything/result.aspx (match) /something/result.aspx (match)
The problem is that I can't just look for "something" and "anything" because there is an unknown combination of them. So, the rule is basically, "If result.aspx is present and it is not present in the form of /search/result.aspx, then match".
I hope that I have explained this clearly. Any help would be greatly appreciated! I swear that I have tried every combination of lookarounds, lookbehinds, and lookaheads that I can come up with.
Thanks in advance,
Joseph
|