Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
"
([\"'])(?:(?=(\\?))\2.)*?\1|(\b\w*[-']\w*\b)|(\b(?!(?:AND|OR)\b)\w+\b)
"
g
Input 1
1
New
word1 AND word2 AND 'word3 word4' OR word5AND ORword6 OR 'word6 \'OR\" word7'