Last active
August 29, 2015 14:20
-
-
Save leobetosouza/1f02a6062c41a380f24b to your computer and use it in GitHub Desktop.
WIP. Uma regex para validar números de telefones brasileiros levando em consideração um número de DDD válido e o nono digito que só é habilitado para celulares de alguns DDDs. Ainda imperfeita.
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
(\((11|12|13|14|15|16|17|18|19|21|22|24|27|28|91|92|93|94|95|96|97|98|99)\)\s(9[1-9][0-9]{3}\-[0-9]{4})|[2-9][0-9]{3}\-[0-9]{4})|(\((31|32|33|34|35|37|38|41|42|43|44|45|46|47|48|49|51|53|54|55|61|62|63|64|65|66|67|68|69|71|73|74|75|77|79|81|82|83|84|85|86|87|88|89)\)\s[2-9][0-9]{3}\-[0-9]{4}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment