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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Phone number parser
Expression
^(?:[\+]?[\(]?([\d]{1,3})[\s\-\.\)]+)?(?:[\(]?([\d]{1,3})[\s\-\/\)]+)([2-9][0-9\s\-\.]{6,}[0-9])(?:[\s\D]+([\d]{1,5}))?$
Description
Parses most phone numbers into four groups: country code, area code, number, and extension.
Matches
011-656-555-1234 | (217)555-1234 | +82-10-5551-2345 | +(82) 10-5551-2345 | (907) 555-1234 | +886-2-55512345 | 1-416-555-1234 | 714 555 1234 | 714 555 1234 / 1234 | +886-2-55512345 x 1234 | +886-2-55512345x1234 | 1-416-555-1234 ext 1234
Non-Matches
7735551234 | +11231234567 | 1(123)1234567
Author Rating: The rating for this expression. Bill Ingram
Source http://bill-ingram.com/2011/11/04/phone-number-parse-regex/
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