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-9]+([,.][0-9]+)?$
"
Unit Tests
.abc
→ regex does not match
.24
→ regex does not match
a.13
→ regex does not match
1.1nawer
→ regex does not match
1.a
→ regex does not match
454.0125
→ regex does match
123456.99
→ regex does match
11.1
→ regex does match
55454,784565
→ regex does match
562,12
→ regex does match
5745,1
→ regex does match
123.
→ regex does not match
1223,
→ regex does not match
12345
→ regex does match
1
→ regex does match
a
→ regex does not match
empty string
→ regex does not match