验证手机号码,小灵通号码函数

验证手机号码,小灵通号码函数

/// <summary>
/// 判断是否是手机号码,小灵通号码
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public static bool IsMobileNum(string input)
{
 RegexOptions   options = RegexOptions.Multiline;
 Regex          regex = new Regex(@"(^13\d{8,9}$)|(^153\d{4,8}$)|(^159\d{4,8}$)|(^0\d{10,11}$)", options);
 //string         input = @"s15319153255";//,13110455887,01088685555,029-88452666,4455";

 bool   isMatch = regex.IsMatch(input);
 if( isMatch )
 {
  return true;
 }
 else
 {
  return false;
 }


posted on 2007-01-30 11:15  玄新  阅读(392)  评论(0编辑  收藏  举报

导航