K
Kim
Hello,
I want valid input to be 1 to 9 digits followed by an optional decimal
point, followed by an optional 1 to 4 digits. I think this should
work:
re = /\d{1,9}\.?\d{1,4}/
The problem I am having is that it is not restricting the number of
digits to the right and left of the decimal point. So my "range" parts
({1,9} and {1,4}) are probably wrong in some way but I cannot figure
out how... I have researched the syntax and this seems to make sense to
me. Please help!
Thanks,
Kim
I want valid input to be 1 to 9 digits followed by an optional decimal
point, followed by an optional 1 to 4 digits. I think this should
work:
re = /\d{1,9}\.?\d{1,4}/
The problem I am having is that it is not restricting the number of
digits to the right and left of the decimal point. So my "range" parts
({1,9} and {1,4}) are probably wrong in some way but I cannot figure
out how... I have researched the syntax and this seems to make sense to
me. Please help!
Thanks,
Kim