this one is really easy.
I’m trying to create a Regular Expression that will result in a Successful Match when against the following text
/default.aspx?
So i tried the following…
^/default.aspx$
and it’s failing to match it.
Can someone help, please?
(i’m guessing i’m screwing up becuase of the \ and the ? in the input expression).
The problem is in the
.(dot), which is a wildcard,You must escape it like
\..Also, Because there is a
?at the end of URL and$(end-of-input) is in the regexp, therefore, it does not match.The correct regexp should be
^/default\.aspx(\?.*)?$