Regular Expressions 101

Community Patterns

decimal double point with range number from minus to plus range number

0

Regular Expression
Python

r"
(^\-?1?[0-9]{,2}(\.\d{,2})?$)
"
gm

Description

the decimal, double point with range number from minus to plus range number, the example from -199.99 to 199.99

revision from example pattern 1:

^(?:\-?1[0][0-9](?:\.\d\d?)?|\-?[1]?[1-9]?[0-9](?:\.\d\d?)?)$

Submitted by eki.saputra - 2 years ago (Last modified 2 years ago)