RegEx, matching if not containing...
- by Tommy Jakobsen
I've been trying to figure out how to write this regular expression. It is to be used for ISAPI_Rewrite, a module for IIS 6, for doing URL rewriting.
I want the url /hg/<parameter> to be mathed, so it can be rewrited to /hg/hgwebdir.cgi/<parameter>.
I've matched it using ^/hg/(.*).
My problem is, if the URL /hg/hgwebdir.cgi/<parameter> is used, the regex should NOT match. Using the above regex with this URL, will rewrite to /hg/hgwebdig.cgi/hgwebdig.cgi/<parameter> which is not correct.
Can you help me create the matching pattern?