easter729
function IsPhoneAvailable (numStr) {

    var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
    return myreg.test(numStr);
}

  

C#验证方法:

public static bool IsMobilePhone(string numStr)
{
    Regex regex = new Regex("^1[34578]\\d{9}$");
    return regex.IsMatch(numStr);
}

  

参考:https://www.cnblogs.com/wuhuisheng/archive/2011/03/23/1992652.html

分类:

技术点:

相关文章:

  • 2021-12-05
  • 2021-08-26
  • 2022-02-17
  • 2021-09-28
  • 2022-12-23
  • 2021-12-05
  • 2021-07-25
猜你喜欢
  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
相关资源
相似解决方案