9
I am trying to build a regex which will allow both negative and positive decimal numbers with the following rules.
- there can not be more than 2 digits after decimal point
- Decimal point is optional
- Total length including decimal point should not exceed 12 char
- if no decimal point is there, max length should not exceed 9 char
Can anyone help me out? thanks a lot in advance.