Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
(?:(?=[#?]).*?[#?]|(?!.*?[#?])^|&)([^= \n]+?)=([^& \n]+?)(?=$|&)
/
gm

Description

Cross-engine query string parsing including when stored in anchor tags.

Not really tested, but basic functionality is there.

Submitted by abernix - 9 years ago