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
/
^(?:(?!\byellow thing\b.*?\bblue thing\b).)*\bgreen thing\b
/
gm
Input 1
1
New
Here we have a yellow thing. Here we have a blue thing. Clearly the green thing is best though. (Should NOT match) You wanna buy some death sticks? I have a green thing. (MATCH) We are on a yellow thing submarine? Look at that green thing over there! (MATCH) Here we have a YELLOWyellow thing. Here we have a blue thing. Clearly the green thing is best though. (Should THIS match?) We are on a blue thing yellow thing submarine? Look at that green thing over there! (SHOULT THIS MATCH?)