Created
January 30, 2020 15:33
-
-
Save alexandreservian/fc5d5adf5674638c17df8c004417d7ba to your computer and use it in GitHub Desktop.
Método test
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
const regex = /(\((\d{2})\)\s?)?(\d{4,5})[-]?(\d{4})/gm; | |
console.log(regex.test('(77) 95684-9783')); //true | |
console.log(regex.test('(68)90499-9922')); //false | |
console.log(regex.test('95088-2649')); //true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment