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
/
(["'])(?:\\?+.)*?\1
/
gm
Input 1
1
New
abc"nail the 2x4 plank"def abc"nail the 2\"x4\" plank"def abc"na\il the 2\"x4\" plank"def abc"na\\il the 2\\\"x4\\" plank"def abc"na\\\il the 2\\\\\"x4\\\" plank"def abc"na\\\\\il the 2\\"x4\\\" plank\"def abc"na\\\i\\"l\\\" t\he 2\"x4\" plank"def abc"test"and"test"def abc'test'and"test"def abc"t'es't"and'test'def abc'te"st'def abc'te\'st'def abc"\"te\"\"st\""def "text" "text \" text" "text text \\" text" 'dhdhdh' 'jsfhjhhds\' 'kjzhfkja'\' abc"some text"text here"pos\si\\b\\\le t\"ext"text"possible text"more text"""end text
Substitution