zoukankan      html  css  js  c++  java
  • 匹配中国移动,联通,电信*的正则表达式

    常用号段如下:

    中国移动:134.135.136.137.138.139.150.151.152.157.158.159.187.188 ,147(数据卡)
    中国联通:
    130.131.132.155.156.185.186
    中国电信:133.153.180.189
    CDMA :133,153


    正则如下:

         
    /// <summary>
             /// 匹配移动手机号
             /// </summary>
            public const string PATTERN_CMCMOBILENUM = @"^1(3[4-9]|5[012789]|8[78])\d{8}$";
             /// <summary>
             /// 匹配电信手机号
             /// </summary>
             public const string PATTERN_CTCMOBILENUM = @"^18[09]\d{8}$";
             /// <summary>
             /// 匹配联通手机号
             /// </summary>
             public const string PATTERN_CUTMOBILENUM = @"^1(3[0-2]|5[56]|8[56])\d{8}$";
             /// <summary>
             /// 匹配CDMA手机号
             /// </summary>
             public const string PATTERN_CDMAMOBILENUM = @"^1[35]3\d{8}$";

    摘自:http://hi.baidu.com/jiang_yy_jiang/blog/item/32cbb1ec6febcddb2f2e21b9.html

  • 相关阅读:
    POJ 3672 水题......
    POJ 3279 枚举?
    STL
    241. Different Ways to Add Parentheses
    282. Expression Add Operators
    169. Majority Element
    Weekly Contest 121
    927. Three Equal Parts
    910. Smallest Range II
    921. Minimum Add to Make Parentheses Valid
  • 原文地址:https://www.cnblogs.com/kinpauln/p/1778015.html
Copyright © 2011-2022 走看看