Created
June 14, 2014 10:26
-
-
Save wiltonbsilva/f53a58d374df51f72fd9 to your computer and use it in GitHub Desktop.
Regular Expression to match Brazilian (cell)?phone numbers
This file contains hidden or 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
RegEx: | |
(^|\()?\s*(\d{2})\s*(\s|\))*(9?\d{4})(\s|-)?(\d{4})($|\n) | |
Test: | |
11957375429 | |
Test: | |
11 976546863 | |
11 976542345 | |
11 97654 9753 | |
(11) 98765 1234 | |
(11)968785324 | |
(11)95676-7654 | |
(11) 98754-6694 | |
(11)5678 1334 | |
(11) 4567 1234 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment