samedi 27 juin 2015

Matching floating point range using regular expression

I need a regular expression, that matches within a range of floats.

For the range 12.33 - 13.41 I tried the following regex:

(12.[3-9][3-9]|13.?[0-4][0-1]?)\d{0,2}

but it doesn't match i.e. 12.41 or 13.39.

Is this possible with regular expressions?

Kind regards, bernie70

Aucun commentaire:

Enregistrer un commentaire