I need a regex match for below set of urls containing ? (question mark)
http://mywebsite/page.aspx?MenuId=1
http://mywebsite/page.aspx?MenuId=2
http://mywebsite/page.aspx?MenuId=3
http://mywebsite/page.aspx?MenuId=4
pls advise
I need a regex match for below set of urls containing ? (question mark)
http://mywebsite/page.aspx?MenuId=1
http://mywebsite/page.aspx?MenuId=2
http://mywebsite/page.aspx?MenuId=3
http://mywebsite/page.aspx?MenuId=4
pls advise
You can do this via the following regular expression:
http\:\/\/mywebsite\/page\.aspx\?MenuId=\d+
That will match any url that looks like http://mywebsite/page.aspx?MenuId=109238091823
with any number entered in the ?MenuId=
parameter being matched.
You can check out http://regex101.com for a good interactive IDE for regular expressions. It also gives you live feedback as you go.