Hi all,I am trying for validation using regular expression for Indian mobile number.
Simply i have tried for"^[8,9]{1}[0-9]{9}$" and some others also
but it is not working.
I want regular expression for:
10 digit mobile number
starts with 8 or 9

Recommended Answers

All 2 Replies

Hi all,I am trying for validation using regular expression for Indian mobile number.
Simply i have tried for"^[8,9]{1}[0-9]{9}$" and some others also
but it is not working.
I want regular expression for:
10 digit mobile number
starts with 8 or 9

Based on that regexp, you must be sure that there are no characters before 8 or 9 AND no characters after the last digit, because you're using the ^ and $. Maybe try pasting the source code to your application to see what you're trying to do with regexp, to try to help you further.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.