Regular Expressions 101

Community Patterns

Capture if pattern NOT found

1

Regular Expression
PCRE (PHP <7.3)

/
^((?:(?!PATTERN).)*)$
/

Description

Capture the input if the pattern is NOT found

Submitted by Byron Jones - 9 years ago