Regular Expressions 101

Community Patterns

The regex tested for all occurences of % that are not within quotation

1

Regular Expression
PCRE (PHP <7.3)

/
[^"'].*?%.*?[^'"]
/
g

Description

all occurences of % that are not within quotation characters

Submitted by Igor Savinkin - 9 years ago