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
/
(\[SM_g])([^[]*)(\[SM_h])((?=([,\.])|(\[SM_l])|( ?&\\?quot;)).*)?
/
gm
Input 1
1
New
[SM_g]word[SM_h].[SM_l] " [SM_g]word[SM_h][SM_l]" [SM_g]word[SM_h]"[SM_l]. [SM_g]word[SM_h]". [SM_g]word[SM_h][SM_l]. [SM_g]word[SM_h]. [SM_g]word[SM_h] [SM_g]word[SM_h] ". [SM_g]word[SM_h][SM_l] &\quot;. [SM_g]word[SM_h].[SM_l]" [SM_g]word[SM_h]"[SM_l]. [SM_g]word[SM_h] ".
Substitution
\1\2\7\3