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

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