0 Replies - 997 Views - Last Post: 15 June 2009 - 01:02 PM

#1 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1658
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Validate US phone number

Posted 15 June 2009 - 01:02 PM

Description: Regular Expression pattern for validating a US phone number. The following formats will be valid: (425) 555-0123 425-555-0123 425 555 0123 1-425-555-0123
^[01]?[- .]?(([2-9]d{2})|[2-9]d{2})[- .]?d{3}[- .]?d{4}$

Is This A Good Question/Topic? 0
  • +

Page 1 of 1