RegEx to get parms from URL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Given a URL of
http://Somthing/Somthing.asp?parm1=val1&parm2=val2&parm3=val3

I'm trying to create an expression that gives me:
parm1=val1
parm2=val2
parm3=val3

As either distinct group values (Match (str).Groups) or as captures of a
group (Match (str).Groups[1].Captures)

I've tried @".*\?(.*&)*?(.*)"
but this gives me the first two parms as a single string with the last parm
being distinct. I've also tried other variations but this is the closest I've
gotten.

TIA,
Dave
 
Are you using URLEncoding? If not, you might want to read up on it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top