Last active
December 17, 2015 03:29
-
-
Save remibreton/5543538 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/(1)?( |-)?(\()?(\d{3})(\))?( |-)?(\d{3})( |-)?(\d{4})/.test('123 456 7890'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Matches:
1234567890
123 456 7890
123-456-7890
1 123 456 7890
1-123 456 8790
1(123) 456 7890
1 (123) 456-7890