Created
December 10, 2017 11:17
-
-
Save Jalalx/534aff5753c6c84b08937c87ea5c64ce to your computer and use it in GitHub Desktop.
Regex to detect Irans mobile 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
public static bool IsMobileNumber(this string value) | |
{ | |
return Regex.IsMatch(value ?? string.Empty, @"^((\+9|\+989|\+\+989|9|09|989|0989|00989)(01|02|03|10|11|12|13|14|15|16|17|18|19|20|21|22|30|31|32|33|34|35|36|37|38|39|90))(\d{7})$"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment