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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find International Phone Numbers
Expression
^((\+)?[1-9]{1,2})?([-\s\.])?((\(\d{1,4}\))|\d{1,4})(([-\s\.])?[0-9]{1,12}){1,2}$
Description
Allows for all kinds of generic international phone numbers, including that of the USA, may include () around area code as well as period, dash, space or nothing seperating numbers. International code needs to be seperated from rest by period, space or dash and my be prefixed with plus. Not overly restrictive but limits size and repetition of codes
Matches
2155552527|(215) 555 2527|215.555.2527|+1 215-555-2527|+1.215.555.2527
Non-Matches
+1215.555.2527|321654|+11+27 215-555-2527
Author Rating: The rating for this expression. Renso Hollhumer
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: Missing
Name: Will
Date: 1/24/2012 12:57:58 PM
Comment:
Your regex does not account for 3 digit country codes ie: +123.123.123.1234


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