I need to alter a RegEx pattern. I currently have this which matches all files ending in .aspx including the querystring:
.*\.aspx.*
I need an expression that matches all except foo.aspx or bar.aspx.
Here are some test strings; bad:
foo.aspx
http:\\www.mycompany.com\foo.aspx
http:\\www.mycompany.com\_app\bar.aspx?param=1
…and good:
http:\\www.mycompany.com\default.aspx
http:\\www.mycompany.com\_app\index.aspx?param=1
index.aspx
On C#
This will consider only the file name. / and \ are path separators.
So C:\foo.bar is equivalent to foo.bar that is a no.