Regular Expressions 101

Exclude particular word in phrase

Open Workspace
  • PCRE2 (PHP)
  • Match
-2

Regular Expression

/
^((?!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