Last active
March 24, 2020 17:39
-
-
Save bmbariah/b226e531042623231d8381019b02afb2 to your computer and use it in GitHub Desktop.
Safaricom Regex for Phone Numbers Prefixes Regex ~ Feb 2020
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 phone_re = /^(\+){0,1}(254){0,1}(70|71|72|79)(\d{7})|(254){0,3}(740|741|742|743|745|746|748|757|758|759|768|769|110|111)(\d{6})$/; | |
// See test cases here | |
// https://regex101.com/r/vuPu6k |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment