Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?:\?|\&)(?<key>[\w]+)=(?<value>[\w+,.-]+)(?:\:?)(?<option>[\w,]*)
/
g

Description

Returns key/value pair of a url. Also works with google fonts which has additional information

Submitted by Anonymous - 8 years ago