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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Phone Number Validation (USA Style)
Expression
^([+0]\d{1,3}[\ \-]?)?(\()?([0-9]{3})(?(2)\)|(\))?)([\-\.\ ])?([0-9]{3})(?(5)\5|\5?)([0-9]{4})$
Description
Validate Phone number like USA/North American Phone style country code allow max 3 digit (required 0 or + as prefix) suffix space or dash is optional
Matches
1234567890 | +11234567890 | +1 1234567890 | 123 456 7890 | 123-456-7890 | 123.456.7890 | (123)4567890 | (123) 456 7890 | (123)-456-7890 | (123).456.7890 | +1123 456 7890 | +1123-456-7890 | +1123.456.7890 | +1 123 456 7890 | +1 123-456-7890 | +1 123.456.7890 | +1(123)4567890 | +1(123) 456 7890 | +1(123)-456-7890 | +1(123).456.7890 | +1 (123)4567890 | +1 (123) 456 7890 | +1 (123)-456-7890 | +1 (123).456.7890 | 01123 456 7890 | 01123-456-7890 | 01123.456.7890 | 01 123 456 7890 | 01 123-456-7890 | 01 123.456.7890 | 01(123)4567890 | 01(123) 456 7890 | 01(123)-456-7890 | 01(123).456.7890 | 01 (123)4
Non-Matches
+ (123).456.7890 | +1234 123 456 7890 | 0 (123).456.7890 | 01234 123 456 7890 | 123 123 456 7890 | 123 4567890 | 123456 7890 | (123 4567890 | (1234567890 | 123-456 7890 | 123.456 7890 | 123 4567890 | +1 123 4567890 | +1 123456 7890 | +1 (123 4567890 | +1 (1234567890 | +1 123-456 7890 | +1 123.456 7890 | +1 123 4567890 | +1123 4567890 | +1123456 7890 | +1(123 4567890 | +1(1234567890 | +1123-456 7890 | +1123.456 7890 | +1123 4567890
Author Rating: The rating for this expression. Ankur Ranpariya
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

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