Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(\/)([\w\/\[\]\{\}]*)(\??[\w\/\[\]\{\}]+\=[\w\/\[\]\{\}]+)*(\&?[\w\/\[\]\{\}]+\=[\w\/\[\]\{\}]+)*$
/
g

Description

Matches URL Path with variables {} and [] for using into API routers

Submitted by Rafael Beckel - 7 years ago