Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?=:)(.*?)(?=\/|$)
/
gm

Description

Lets modify a route dinamically from any word that starts with ':' until the next slash

Submitted by anonymous - 5 years ago