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})*)\$0
/
gm
Input 1
1
New
Hello '$0'. '$0' becomes the World. This shall remain \$0. Extra: \\$0 is World, \$0 is escaped.
Substitution
$1World