Regular Expressions 101

Community Patterns

Negative

1

Regular Expression
PCRE (PHP <7.3)

/
^((?!hello|goodby)[\s\w]+) ((?!word|cosmos)[\s\w]+)!
/

Description

Negation in pattern example

Submitted by Kutuzov Alexey <Kutuz27> - 8 years ago