473,383 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

RegEx to get parms from URL

Given a URL of
http://Somthing/Somthing.asp?parm1=v...al2&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
Jun 12 '06 #1
1 1355
Are you using URLEncoding? If not, you might want to read up on it
--
Saad Rehmani / Prodika / Dallas / TX / USA
Given a URL of
http://Somthing/Somthing.asp?parm1=v...al2&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

Jun 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Don | last post by:
Will the following pass parms "Color" and "Contrast" to the PHP script? If so, how does one retrieve the parms within the script? http://xyz.com/script.php?Color=blue&Contrast=weak Thanks,...
4
by: Chuck Haeberle | last post by:
I have an interesting regular expression challenge for someone more experienced with them than I for a data layer class... I need an expression to search a SQL statement (any type, SELECT INSERT...
4
by: Angel | last post by:
I'm trying to call a DLL function that receives as parameter a user-defined structure created by the company that made the dll. When I call the function from my main form, I call...
4
by: sklett | last post by:
given one of these two string: ProtocolRecord(0, 100, 100, arZeroMax , 1, 0, SKIP,0), ProtocolRecord(0, 100, 100, arSetSet , 4, 0, DJMPNZSTOP, (void *) &Protocol_TD) I want to pull all the...
6
by: Paul M | last post by:
Hi All, I'm currently writing a z/OS DB2 Stored Proc in C, using an example from the IBM Stored Procedure guide (SG24-7083-00). The database calls to read and update the database work...
1
by: Dave | last post by:
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...
4
by: Dave | last post by:
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...
15
by: morleyc | last post by:
Hi, i would like to remove a number of characters from my string (\t \r \n which are throughout the string), i know regex can do this but i have no idea how. Any pointers much appreciated. Chris
1
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, what's the best way to turn my csv string into sql parms? the sql parms can vary in count. thanks, rodchar
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.