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
/
(^|[^\$])\$([^\$]+)\$([^\$]|$)
/
g
Input 1
$test$ This is $a+b_{k}+c$ sentence. Another test $s_\text{hi}+3$. $x=y$ there. $$y=z$$ why? $$z=z$$ This could be ($3^2$, $x_1$). $test$
Substitution
$1\\($2\\)$3
$test$ This is $a+b_{k}+c$ sentence. Another test $s_\text{hi}+3$. $x=y$ there. $$y=z$$ why? $$z=z$$ This could be ($3^2$, $x_1$). $test$