Regular Expressions 101

Community Patterns

Exclude particular word in phrase

-2

Regular Expression
PCRE2 (PHP >=7.3)

/
^((?!test).)*$
/
gm

Description

this will exclude particular phrase from a line. means it will match only those line which dont have those word

Submitted by anonymous - 3 years ago