通过系统自带的NSPredicate使用正则表达式
- NSString *regex =[NSString stringWithFormat:@"^1(3[4-9]|5[012789]|8[2378]|47)\\d{8}$"];
- NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",regex];
3. BOOL isMatch = [predicate evaluateWithObject:editPhoneField.text];