Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-10-20 23:48
Flavor·PCRE2 (PHP)

/
^(?!notword)(?:(?!notword).)*yesword
/
gm
Open regex in editor

Description

Modified from this StackOverflow answer, this Regex matches a word or phrase which is not preceded by another word or phrase

Submitted by anonymous