Mobile phone number password regular verification

  • 2020-03-30 03:50:58
  • OfStack

  / * *
        * mobile phone number
        * mobile: 134-8 0 and 3, 135136137138139150151157158159182187188
        * unicom: 130131132152155156185186
        * telecommunications: 133,1349,153,180,189
        * /
      Nsstrings * MOBILE = @ "^ 1 (3 [0-9] 5 [9] 0 to 35 - | | 8 [025-9]) \ \ d {8} $";
      / * *
                          * China Mobile: China Mobile
                          * 134 [0 to 8], 135136137138139150151157158159182187188
                          * /
      Nsstrings * CM = @ "^ 1 (34 [0 to 8] | (3, 5 - [9] 5 [017-9] | | 8 [278]) \ \ d) \ \ d {7} $";
      / * *
                          * China Unicom: China Unicom
                          * 130131132152155156185186
                          * /
      Nsstrings * CU = @ "^ 1 (3 5 [256] [0-2) | | 8 [56]) \ \ d {8} $";
      / * *
                          * China Telecom: China Telecom
                          9153180189 * 133134
                          * /
      Nsstrings * CT = @ "^ 1 ((53 | | 8 [09] 33) [0-9] | 349) \ \ d {7} $";
      / * *
                          * mainland fixed line and PHS
                          * the area code: 010020021022023024025027028029
                          * number: seven or eight digits
                          * /
      / / nsstrings * PHS = @ "^ 0 (10 (0-5789) | | 2 \ \ d {3}) \ \ d {7, 8} $";

password
^ (& # 63; =. * & # 63; [a zA - Z]) (the & # 63; =. * & # 63; [0-9]) [a zA - Z0-9] 6, 20} {$

"^\d+$"// non-negative integer (positive integer + 0) & PI;   "^[0-9]*[1-9][0-9]*$"// positive integer & PI;   "^(-\d+)|(0+))$"// non-positive integer (negative integer + 0) & PI;   "^-[0-9]*[1-9][0-9]*$"// negative integer & PI;   "^ - the & # 63; \ d + $" / / integer     "^ \ d + (\ \ d +) & # 63; $"// non-negative floating point (positive floating point + 0) & PI;   "^ (([0-9] + \. [0-9] * [1-9] [0-9] *) | ([0-9] * [1-9] [0-9] * \ [0-9] +) | ([0-9] * [1-9] [0-9] *)) $" / / are floating point Numbers     "^ ((\ d + (. \ \ d +) & # 63;) | ((\. 0 0 + +) & # 63;) )$"// non-positive floating point (negative floating point + 0) & PI;   "^ (- (([0-9] + \. [0-9] * [1-9] [0-9] *) | ([0-9] * [1-9] [0-9] * \ [0-9] +) | ([0-9] * [1-9] [0-9] *))) $" / / negative floating point   The number     "^ (- the & # 63; . \ d +) (\ \ d +) & # 63; $"// floating point number     "^[a-za-z]+$"// A string of 26 English letters     "^[a-z]+$"// A string of 26 uppercase English letters & PI;   "^[a-z]+$"// a string of 26 lowercase English letters & PI;   "^[a-za-z0-9]+$"// A string of Numbers and 26 English letters & PI;   "^\w+$"// a string of Numbers, 26 letters, or underscores & PI;   "^ [-] \ w + \. ([-] \ w +) * @ [-] \ w + \. ([-] \ w +) + $" / / email address     "^ [a zA - z] + : / / (\ w +) (\ w +) * (\. (\ w + (\ w +) *)) * (\ & # 63; \ S *) & # 63; $" / / url    /^13\d{9}$/gi phone number regular expression

Public static bool IsValidMobileNo(string MobileNo)& noon;   {      Const string regPattern = @"^(130|131|132|133|134|135|136|137|138|139)\d{8}$";       Return the Regex. IsMatch (MobileNo, regPattern);     }

Regular expression -- verify phone number :13[0-9]{9}  Mobile phone number before the band 86 or +86 :^((\+86)|(86))? (13) \ d {9} $  Verify phone number and mobile phone number simultaneously :(^(\d{3,4}-)? \ d {7, 8}) $| (13 [0-9] {9})     Extracting network links in information :(h| h)(r| r)(e| e)(f| f)& PI; * =   * (" | ") & # 63; (| \ \ | \ \ w / | \.) + (' | |  " * | >) The & # 63;       To extract the information of the email address: \ w + (\ w + / - +.]) * @ \ w + ([-] \ w +) * \ \ w + ([-] \ w +) *       Image link in extract information :(s| s)(r| r)(c| c)  * =   * (" | ") & # 63; (| \ \ | \ \ w / | \.) + (' | |  " * | >) The & # 63;   Extract the IP address in the message :(\d+)\.(\d+)\.(\d+)\.(\d+) \.(\d+)& \;         Chinese mobile phone number :(86) * 0 * 13 \ d {9}           Chinese fixed telephone number in extracted information :(\ (\ d {3,4} \) | \ d {3,4} - | \ s) & # 63; \ d {8}           To extract the information of Chinese telephone number (including mobile and fixed phone) : (\ (\ d {3, 4} \ | \ d {3, 4} - | \ s) & # 63; \ d {7, 14}           Chinese postal code in extract information: [1-9] {1} (\ d +) {5}           Chinese id card number: \ d {18} | \ d {15}           Integer in extract information: \d+& PI;         Extracting floating point Numbers (that is, decimals) from information :(-? \ \ d *). & # 63; \ d +           Extract any number in the message   : - the & # 63; . (\ d *) \ \ d +) & # 63;       Extract the Chinese string in the message: [\u4e00-\u9fa5]*          Extract the double-byte string & PI in the message; (Chinese character) : [^\x00-\ XFF]* 


Related articles: