• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 465
  • 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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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