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
r"
^(?!0+$)\d{1,7}$
"
gm
Input 1
1
New
01 010 123 0000001 1234567 12345678 0 000000 a123 123a -0 -123
Substitution
01 010 123 0000001 1234567 12345678 0 000000 a123 123a -0 -123