Created
December 3, 2015 18:15
-
-
Save Alexintosh/184f3d84924040932f7d to your computer and use it in GitHub Desktop.
Regex ex
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
UK NUMBERS | |
$scope.phoneRegex = /^(\s*(\s*^\+44\s*)|^(\s*4{2})|(\s*^0{2}4{2}\s*)|(\s*^0)\s*|)(\s*[123456789]\s*)(\s*\d\s*){8,9}\s*$\s*/; | |
//WARNING This regex will accept only UK numers (+447, 07) | |
$scope.phoneRegex = /^(\s*(\s*^\+44\s*)|^(\s*4{2})|(\s*^0{2}4{2}\s*)|(\s*^0)\s*|)(\s*[7]\s*)(\s*\d\s*){9}\s*$\s*/; | |
//Generic phone number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://regex101.com/r/pD7vV3/4