RegularExpression?

  • Thread starter Thread starter Arpan
  • Start date Start date
A

Arpan

Using RegularExpression, I want to validate a TextBox so that the
TextBox accepts only 8-digit numbers. This can be done with the
following RegularExpression:

[0-9]{8}

But how do I validate the TextBox so that it accepts 8-digit number or
more than 8-digit numbers using RegularExpressions?

Also how do I validate the TextBox so that it accepts 8 or more than
8-digit numbers but less than or equal to 10-digit numbers using
RegularExpressions? I tried this but it didn't work:

([0-9]{8})|([0-9]{9})|([0-9]{10})

The above RegEx accepts only 8-digit numbers, not 9 & 10-digit numbers.

Thanks,

Arpan
 
Back
Top