RegularExpression?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top