How to allow only three numbers before a decimal point and two numbers after it. Is there a regex for this?

44 views Asked by At

Only numbers between 0.00 and 100.00 can be allowed. The number can also be without decimal point. I am trying to use this regex,

/^[1-9][0-9]{0,2}(?:,?[0-9]{3}){0,3}(?:\.[0-9]{1,2})?$/

But this allows more than 3 numbers before decimal point. Trying to use the regex in ng-pattern of angular js.

0

There are 0 answers