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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details 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
   Displaying page 1 of 1 pages; Items 1 to 1

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