手机正则

/// <summary>
        /// 判断输入的字符串是否是一个合法的手机号
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static bool IsMobilePhone(string input)
          {
              Regex regex = new Regex("^1[34578]\\d{9}$");
             return regex.IsMatch(input);
  
        }
posted @ 2017-04-28 12:20  我叫阿良❤善良的良  阅读(170)  评论(0编辑  收藏  举报