subendong

 

        /// <summary>
        /// 海外手机格式正则匹配
        /// 添加人:屌丝大叔
        /// 添加时间:2018-1-25 13:38:23
        /// </summary>
        /// <param name="mobile">手机号码</param>
        /// <returns></returns>
        private bool CheckWorldMobileFormat(string mobile)
        {
            if (Regex.IsMatch(mobile, @"^\+[\d]{1,5}\s[\d]{1,14}$"))
            {
                return true;
            }

            return false;
        }

比如:“+1 9028005921”,表示加拿大的手机号码。

分类:

技术点:

相关文章:

  • 2021-11-23
  • 2021-12-10
  • 2021-12-10
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-12-10
猜你喜欢
  • 2021-10-03
  • 2021-08-16
  • 2021-08-16
  • 2021-08-16
  • 2021-10-27
  • 2022-12-23
相关资源
相似解决方案