Chaitanya

Chaitanya

  • NA
  • 58
  • 57.4k

Regex to accept only 2 places after .

May 20 2011 4:30 AM

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


Answers (4)