0

I am trying to create a reg exp. that falls in 0.21 to 1 range I ended doing something like

'^(?:1(?:\.0)?|0?\.[21-9]{2,2})$'

The above seems to be working but not sure if it survives all the cases, moreover the expression seems to be a bit long. Is there a way to minimize it.

Zaker
  • 537
  • 16
  • 30

0 Answers0