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
/
(?im)^.*\bthe car\b(?!.*\bnot\b).*
/
g
Input 1
Should match This is not the car i want The car is green should not match The car is not green This is the car i want, but its not available
Substitution
Should match This is not the car i want The car is green should not match The car is not green This is the car i want, but its not available