Skip to content

Instantly share code, notes, and snippets.

@dcosson dcosson/gist:3430463
Created Aug 22, 2012

Embed
What would you like to do?
Phone number regex in js
// allows:
// 1235554567
// (123) 555-4567
// 123.555.4567
// 123-555-4567
/^\(?[0-9]{3}[.\-\)]?\s?[0-9]{3}[.-\s]?[0-9]{4}$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.