I can't seem to find the right keywords to find the google to my
problem.
I need to find out if two strings have a partial match within each
other.
I am using it do to URL comparisons for an httpmodule I am writing.
For me, I want a regex or simple algorithm to make statements like
this true:
"~/Subfolder/Login.aspx" is like "localhost/Application/Subfolder/
Login.aspx"
I get "~/Subfolder/Login.aspx" from GetFormsAuthLoginUrl() and
"localhost/Application/Subfolder/Login.aspx" from
CurrentRequest.Url.AbsolutePath so both of these values will depend on
how developers setup forms authentication on websites.
I am sure I can find some kind of answer by doing a comparison of
Url.Segments or maybe a comparison on instrings starting at the last /
but I just found it intriguing I could not easily find a generic
string-like-string snippet on the web.