match word regular expression
-
I'm having a bit of trouble with a regular expression. I need to match a url when it is something like services/service1.aspx but not when it is services/default.aspx. I thought this would work
\bservices\b\/[^default]\.aspx
but it doesn't seem to and neither does this\bservices\b\/[^d][^e][^f][^a][^u][^]][^l][^t]\.aspx
. Can anyone help me with this. Thanks SuzyB If I had a better memory I would remember more. -
I'm having a bit of trouble with a regular expression. I need to match a url when it is something like services/service1.aspx but not when it is services/default.aspx. I thought this would work
\bservices\b\/[^default]\.aspx
but it doesn't seem to and neither does this\bservices\b\/[^d][^e][^f][^a][^u][^]][^l][^t]\.aspx
. Can anyone help me with this. Thanks SuzyB If I had a better memory I would remember more. -
Perhaps "services/[^default].+\.aspx" is usefull enough for you. this matches "services/something.aspx" but neither "services/default.aspx" nor "services/something.htm" --------------------------- 127.0.0.1 - Sweet 127.0.0.1
Thanks, that worked, but for only about half the urls I needed to check. I played about with it a bit and found that this seems to work
services/.+[^default].+\.aspx
. It doesn't match all words but I think it'll do for my purposes. SuzyB If I had a better memory I would remember more. -
Thanks, that worked, but for only about half the urls I needed to check. I played about with it a bit and found that this seems to work
services/.+[^default].+\.aspx
. It doesn't match all words but I think it'll do for my purposes. SuzyB If I had a better memory I would remember more.