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{1,2}|$)$
/
Unit Tests
45.45ggggg
→ regex does not match
54.5454
→ regex does not match
4.f4
→ regex does not match
3f.44
→ regex does not match
1245343.53
→ regex does match
5
→ regex does match
5.4
→ regex does match
5.
→ regex does not match
5.67
→ regex does match