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
/
^0+(\d)|(\d)0+$
/
gm
Input 1
1
New
00001011100000 000 000000123 000000456000000000000 789000
Substitution
$1$2