1 +(BOOL)CheckPhoneNumInput:(NSString *)_text{ 2 NSString *Regex =@"(13[0-9]|14[57]|15[012356789]|18[02356789])\\d{8}"; 3 NSPredicate *mobileTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", Regex]; 4 return [mobileTest evaluateWithObject:_text]; 5 }
转载于:https://www.cnblogs.com/guangzhi405/archive/2012/08/10/2632230.html