Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(\%(\w+(-|_)?(\w+)?)\%)+
/
g

Description

Allows you to do a regex for all keywords starting and ending with a % sign, including ones with dashes or underscores.

Submitted by anonymous - 7 years ago