RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Query String Parameters
Expression
[\?&](?<name>[^&=]+)=(?<value>[^&=]+)
Description
Matches name/value pairs in HTTP Query Strings, placing name into group named "name" and value into group named "value"
Matches
http://regexlib.com/?a=b&c=d
Non-Matches
http://regexlib.com/
Author Rating: Not yet rated. Kevin Spencer
Source Kevin Spencer
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Doesn't work with real world data
Name: Clint
Date: 9/21/2009 9:19:49 AM
Comment:
A simple example of ?a=test&b=cats & dogs yields a=test, and b=cats. I've been trying to find a clean solution to this for a few days now with no luck.


Title: Cool
Name: Nuwan
Date: 4/7/2009 3:01:25 AM
Comment:
Thanks


Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials