//正则过滤

    NSString *regex = @"^((13[0-9])|(15[^4,\\D])|(18[0,0-9]))\\d{8}$";

    NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];

    BOOL isMatch = [pred evaluateWithObject:@"手机号"];

  //

    if (!isMatch) {

     //非手机号

    }

 

相关文章:

  • 2021-12-28
  • 2022-02-03
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2021-12-20
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2021-10-07
  • 2021-07-11
  • 2021-12-09
相关资源
相似解决方案