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+)(?:\.+|(\.)\.*(\d)\.*(\d).*)$
/
gm
Input 1
1
New
123.12 12 12.13 12. 12.555 12.... 12. 12.35.12.14 12..2..5
Substitution
$1$2$3$4
123.12 12 12.13 12. 12.555 12.... 12. 12.35.12.14 12..2..5