Looking for regex which will strictly allow 1 to 9 digits before decimal dot(.) and 1 or 2 digits after dot(.)
It should validate
65564.54
654654654.45
1.55
But not
556
654654654
65455.6544
55.566
I have tried ^[0-9]{1,9}\.[0-9]{1,2}$
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
http://rubular.com/r/IdYgiwNmoH
And for numbers not separated by linebreaks:
http://rubular.com/r/yVFJKsqsiZ