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
/
(?:^\d{6}|=\d{7}|\G)(?=\d{5,8}=|\d*$)\K\d
/
gm
Input 1
1
New
12345678999999=654784651321 4567894135=456789211 123=0123456789 0123456789=123 0123456789123=123
Substitution
12345678999999=654784651321 4567894135=456789211 123=0123456789 0123456789=123 0123456789123=123