Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
\b(?!(?:word1|word2)\b)\w+
/
gu
Input 1
1
New
Basically I need a regex which will return true if the string is a word (\w+) EXCEPT if it is the word word1 OR word2.
Substitution