Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
&(?![a-z]*;)
/
gm

Description

Get all ampersands, but omits the ampersands that are part of any HTML entities.

Submitted by anonymous - 5 years ago