RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Mobile Number Validation
Expression
^((\+)?(\d{2}[-]))?(\d{10}){1}?$
Description
Indian mobile no. with country code as optional example:-- function validate() { var filter1=/^((\+)?(\d{2}[-]))?(\d{10}){1}?$/,filter2=/^((\+)?(\d{2}[-])(\d{2}[-]))?(\d{8}){1}?$/; var mobileNo=$("#mobileNo").val(),temp=0; if (filter1.test(mobileNo)) { //temp++; } if (filter2.test(mobileNo)) { temp++; } if (temp>0) { alert("Matched with given format!"); } else { alert("Not Matched with given format!"); } here mobileNo is an input filed in my html page.. you can use it as per your need..
Matches
+91-9822345654,9822345654,+91-80-25746669
Non-Matches
+923-9855777897,6463466
Author Rating: The rating for this expression. Deepak Goswami
Source Jay Ho..
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials