Solved

Phone number

Posted on 2014-01-15
2
429 Views
Last Modified: 2014-01-16
I just need a regex format for phone number for this format (xxx) xxx-xxxx
Thank you in advance.

http://regexlib.com/Search.aspx?k=phone
0
Comment
Question by:VBdotnet2005
2 Comments
 
LVL 35

Accepted Solution

by:
Terry Woods earned 500 total points
ID: 39784085
This should do it, for validation purposes:
^\(\d{3}\)\s\d{3}-\d{4}$

Open in new window

If however you are trying to find a value in that format within a string, then the pattern would be a bit different (in which case, let me know).
0
 

Author Comment

by:VBdotnet2005
ID: 39786011
thank you
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question