Aug 26, 2011 at 7:45 PM
Edited Aug 26, 2011 at 7:49 PM
? is a meaningful character in the regex language. It does not match ?. It implies "zero or more of the previous atom". In your case, the previous atom is x. Also, the dot is a meaningful character. It matches any character.
An example: The regex pattern .... blahblah.aspx? matches
blahblah.asp as well as blahblah.aspx and
The regex pattern .... blahblah.aspx?&foo matches
blahblah.asp&foo as well as blahblah.aspx&foo and
Looking at your pattern, it's probably not what you wanted.
By the way, The IIRF documentation is just CHOCK FULL of little bits of information like this, information that will make your use of IIRF much more pleasant for you. I recommend that you Check it out!
A good way to determine if your regexes are doing what you want is to use visual a regex testing tool.
There are many free tools available. One is available here:
The recommendation to use a visual test tool is another thing that is in the IIRF documentation.
Finally, I know of no URLs that include a sequence like this: Page.aspx?&var=7 . Normally the ampersand separates distinct query params, and the ampersand does not appear as the first character after the question mark. I think
you've got something a little confused there. Re-visit that.