• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 470
  • Last Modified:

Phone number

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
VBdotnet2005
Asked:
VBdotnet2005
1 Solution
 
Terry WoodsIT GuruCommented:
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
 
VBdotnet2005Author Commented:
thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now