Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Numbers only (including decimals) ( JS work fine)
Open Workspace
JavaScript
Match
Updated 2022-01-22 00:35
1
Regular Expression
/
\b
0
|
(
[^
\d
*
\.
?
\d
*
]
)
/
g
Description
Rejects first symbol if 0 and all other non number (doesn't includes .123 )
Submitted by
Sofitt