S
Sems
Hi
I am using a regular expression and want to change it a little bit but
am not sure how.
I have this regex...
@"^(?<page>sport/news/[^\s/]+)(?<articlePage>/\d+/\d+/\d+/\S+)$"
Which mateches...
http://mysite.com/sport/news/news-cat-1/2011/01/21/article-1
I also want it to match this...
http://mysite.com/sport/somethingelse/news-cat-1/2011/01/21/article-1
So I want to remove the 'news' in the regex to match any string. How
would I do this in this case? I tried this but it didn't work...
@"^(?<page>sport/[\S]/[^\s/]+)(?<articlePage>/\d+/\d+/\d+/\S+)$"
Thanks
I am using a regular expression and want to change it a little bit but
am not sure how.
I have this regex...
@"^(?<page>sport/news/[^\s/]+)(?<articlePage>/\d+/\d+/\d+/\S+)$"
Which mateches...
http://mysite.com/sport/news/news-cat-1/2011/01/21/article-1
I also want it to match this...
http://mysite.com/sport/somethingelse/news-cat-1/2011/01/21/article-1
So I want to remove the 'news' in the regex to match any string. How
would I do this in this case? I tried this but it didn't work...
@"^(?<page>sport/[\S]/[^\s/]+)(?<articlePage>/\d+/\d+/\d+/\S+)$"
Thanks