Tutorials
Code
Knowledge Base
News
Forums
Pictures
Videos
Bargains
Icons
Newsgroups
News
Skype May Be Shut Down
Google Voice Application Blocked By Apple
CO2 buildup cuts spacewalk short
UK Bans iPhone 3G Advertisement
Recycled Urine As Drinking Water For ISS Astronauts
Tutorials
Working With Collections In Java - Part 1
Quicksort in Java
Multithreading Fundamentals in Java
Selection Sort Algorithm in Java
Bubble Sort Algorithm in Java
Code
String Ends With Values in Array of Strings
Display Time Left To a Date
Simple Interest Calculator Java Applet
Display Time That Passed Since a Date
Validate String For Positive Integer Values
Resources
2,000,000 Visits and Growing
Pygame Primer, Mark 2 - Movement
Creating WCF Service using Workflow...
Building A Color Picker Using ASP.NET...
Open and publish a live website in...
Newsgroups
VB And XML Request
Funding Resources For Small-Mid...
Office 2007 Smart Tag Actions Menu...
.NET Vision 2010 Vol.1 - Adding...
How To Change Dataform Edit Button...
Search
Tutorials and Code
ActionScript
(5)
ASP
(7)
ASP.NET
(28)
Assembly
(1)
C
(6)
C#
(132)
C++
(33)
CSS
(6)
General
(4)
HTML
(6)
Java
(28)
JavaScript
(38)
MySQL
(2)
Objective C
(1)
Pascal
(1)
PHP
(61)
Python
(3)
Ruby
(18)
Silverlight
(1)
SQL
(7)
VB.NET
(5)
Visual Basic
(3)
Syndication
Latest Tutorials
(RSS)
Latest Code
(RSS)
Latest KB Entries
(RSS)
Latest News
(RSS)
Latest Bargains
(RSS)
Latest Pictures
(RSS)
Latest Newsgroups
(RSS)
Latest Books
(RSS)
Latest Tutorials
(Klip)
Latest Code
(Klip)
Latest KB Entries
(Klip)
Latest News
(Klip)
Latest Bargains
(Klip)
Latest Pictures
(Klip)
Latest Newsgroups
(Klip)
Latest Books
(Klip)
My Account
Username:
Password:
» Sign Up
» Reset your password
My Account
Add Tutorial
Add News Story
Add Review
Add Article
Community Forums
General Chat
(553)
Web Development
(78)
Windows Development
(92)
Webmaster Tools
PageRank™ Checker
Alexa Rank Checker
Domain-Name Lookup
Tech Jobs
Geekpedia
»
Regex Knowledge Base
»
Regular expression for validating phone numbers
Regular expression for validating phone numbers
On
Tuesday, October 2nd 2007
at
10:46 PM
By
Andrew Pociu
(View Profile)
(Rated
2.5
with
2 votes
)
Advertisement
The following regular expression will validate phone numbers in all well known formats, such as:
555-12-34
555 12 34
555 1234
555 12-34
5551234
(012) 555-12-34
(012) 555 1234
+1 (012) 555-12-34
+1 (012) 5551234
...and many other similar formats.
/
^(
\+\d
)*
\s
*(\(
\d
{3}
\)
\s
*)*\d
{3}
(-
{0,1}
|
\s
{0,1}
)
\d
{2}
(-
{0,1}
|
\s
{0,1}
)
\d
{2}
$/
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
Rate this Knowledge Base article
Excellent
Good
Fair
Mediocre
Poor
Current Comments
by
piapeti
on
Wednesday, December 16th 2009
at
05:49 AM
this regular expression is fine
by
piapeti
on
Wednesday, December 16th 2009
at
05:55 AM
this regular expression is fine
Comment on this Knowledge Base article
Name:
Email:
Message:
Subscribe me to future replies
Related Knowledge Base Articles
There are no related KB articles.
Related Source Code
There is no related code.
Related Tutorials
There are no related tutorials.
Regex Job Search
My skills include:
Enter a City:
Select a State:
All United States
Alabama
Alaska
Arizona
Arkansas
California
Colorado
Connecticut
Delaware
District of Columbia
Florida
Georgia
Hawaii
Idaho
Illinois
Indiana
Iowa
Kansas
Kentucky
Louisiana
Maine
Maryland
Massachusetts
Michigan
Minnesota
Mississippi
Missouri
Montana
Nebraska
Nevada
New Hampshire
New Jersey
New Mexico
New York
North Carolina
North Dakota
Ohio
Oklahoma
Oregon
Pennsylvania
Rhode Island
South Carolina
South Dakota
Tennessee
Texas
Utah
Vermont
Virginia
Washington
West Virginia
Wisconsin
Wyoming
Advanced Search >>
Latest Tech Bargains
Nokia 6085 Quad-Band GoPhone
$29.99 w/ free shipping
Crucial Ballistix Tracer Dual Channel 1GB DDR2 Memory
FREE after $35 rebate
Maxtor 500GB Ultra16 SATA II HDD
$49.99 w/ free shipping
Samsung A117 Prepaid w/ No Contract
$9.99 w/ free shipping
View More Bargains
Bargains RSS Feed
Advertisement
Free Magazine Subscriptions
Macworld
FREE SUBSCRIPTION
by Mac Publishing LLC
z/Journal
FREE SUBSCRIPTION
by Thomas Communications, Inc.
Oracle Magazine
FREE SUBSCRIPTION
by Oracle Corporation
Website Magazine
FREE SUBSCRIPTION
by Website Services Inc.
View More Magazines
Today's Pictures
Wetkeys Washable Keyboard
Tags:
Keyboard
,
Gadgets
Windows 7 Blue Wallpaper
Tags:
Wallpaper
,
Windows 7
Orange-Red Toshiba Wallpaper
Tags:
Toshiba
,
Wallpaper
View More Pictures
Today's Video
Microsoft Gaze
View More Videos
Other Resources
Bargains
Answering Service
Microsoft Office Training
Invisible On Yahoo!
Error Bank
FlashForward Forums
Order Microsoft Windows 7
Latest Download
Building Line of Business Applications with WPF
View More Downloads
Latest Icons
View More Icons
About Geekpedia
Contact Us
Advertise
Statistics
FAQ
Legal
Privacy Policy
Terms and Conditions
Copyright Information
More Resources
External Resources
Free Books
Free Magazines
Tech Jobs
Downloads
Search
Closed Sections
Announcements
Lexicon
Reviews
Hardware
Projects
Polls
Geekpedia Network
DevPub.com
ErrorBank.com
WindowsVienna.com
DotNetOnWeb.com
Copyright © Geekpedia 2004 - 2010. All Rights Reserved.