匹配移动,联通,电信手机号码正则表达式
常用号段如下:
中国移动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}$";
中国移动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}$";
posted on 2009-04-03 19:39 yyliuliang 阅读(2358) 评论(0) 编辑 收藏 举报