RegEx and parsing a URL

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

Guest

I'm building a test platform that includes parsing a set of URL's. This is
not part of a ASP.Net project. Otherwise I'd be posting it in that area.

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
 
You might want to see the answers to your duplicate post in another group.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

A lifetime is made up of
Lots of short moments.
 

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

Similar Threads


Back
Top