I need to modify a regular expression that matches a url for a redirect. The main part of it is this:
#^/webpages/ProdPage.aspx|^/default.asp#
That (i think) matches all the occurence that comes from webpages/ProdPage.aspx or default.asp. I need to modify it so that it will match default.asp or Default.asp. Maybe I should just add an i after the delimiter but I don’t want the entire expression to be case insensitive.
thanx
Luke
Change your
default.aspto[dD]efault.aspto allow just thedto be lower or upper case.Additionally, you might consider changing your
.to\.as you want it to match a literal dot (ProdPage.aspx, default.asp). Otherwise,.will be interpreted in its regex sense meaning “any character except newline”, so a pagewebpages/ProdPageaaspxwould match (even though it’s extremely unlikely…)