Hi all i need all these possible cases to be valid
123
123.1
123.12
I tried this ^[0-9]*\.[0-9]{2}$ or ^[0-9]*\.[0-9][0-9]$ but does not works can any one help me out. And also before . it should accept a maximum of 6 numeric values
Hi all i need all these possible cases to be valid
123
123.1
123.12
I tried this ^[0-9]*\.[0-9]{2}$ or ^[0-9]*\.[0-9][0-9]$ but does not works can any one help me out. And also before . it should accept a maximum of 6 numeric values
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dorababu MekaPosted May 20, 2011, 4:36 AM
^[0-9]{0,6}(\.[0-9]{1,2})?$
^(\d{0,6})(\.\d{1,2})?$
Abhimanyu K VatsaPosted May 20, 2011, 4:46 AM
http://regexlib.com/DisplayPatterns.aspx?cattabindex=2&categoryId=3
ChaitanyaPosted May 20, 2011, 4:46 AM
VulpesPosted May 20, 2011, 4:42 AM
^\d{1,6}(\.\d{1,2})?$
EDIT: changed final * to ?