Regular Expressions 101

Community Patterns

URL Parameters & Values

1

Regular Expression
ECMAScript (JavaScript)

/
[(\?|\&)]([^=]+)\=([^&#]+)
/
g

Description

Returns matches of parameter and value separately from a URL. Ignores anything after a #.

Submitted by Ross Tracy - 8 years ago