Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?!THE TREE IS GREEN)(THE[ ]+TREE[ ]+IS[ ]+GREEN)
/
gm
Input 1
New
"In this text, THE TREE IS GREEN should not match, THE TREE IS GREEN should and so should THE TREE IS GREEN but double-spaced TEXT SHOULD NOT BE FLAGGED outside the pattern."