flutter 记录正则匹配

手机号正则匹配:

// 正则匹配
  static bool isChinaPhoneLegal(String str) {
    return new RegExp('^((13[0-9])|(15[^4])|(166)|(17[0-8])|(18[0-9])|(19[8-9])|(147,145))\\d{8}\$').hasMatch(str);
  }

猜你喜欢

转载自www.cnblogs.com/110-913-1025/p/11396273.html