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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find All Country Phone number regular expression
Expression
^\+?\d{2}|\0(?:\-?|\ ?)(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$
Description
This regular expression validates all country phone number formats with country code, plus(+) sign, allowed brackets('(', ')'), dots(.), dashes(-). Plus (+) and country code is optional. Above expression allows alphabetical characters. To prevent alphabetical characters first check with this expression /^[^a-z]+$/i then check the main expression.
Matches
+91 999 888 7777, 999 888 7777, 9998887777, +91 (999) 888 7777, (999) 888-7777 | 999-888-7777
Non-Matches
Doesn't allow alphabetic characters | 0010011212 | 1991991212 | 123) not-good
Author Rating: The rating for this expression. Ankur Raiyani
Source
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

Title: All required functionality
Name: Davide Bernado
Date: 9/24/2014 3:58:02 AM
Comment:
This expression has fulfilled my all requirements for phone number validation. Thanks Ankur. This is the best.


Title: All required functionality
Name: Davide Bernado
Date: 9/24/2014 3:57:52 AM
Comment:
This expression has fulfilled my all requirements for phone number validation. Thanks Ankur. This is the best.


Title: All required functionality
Name: Davide Bernado
Date: 9/24/2014 3:57:37 AM
Comment:
This expression has fulfilled my all requirements for phone number validation. Thanks Ankur. This is the best.


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