NSString *str = @"13056258745.9";
NSString *regex = @"^[1][3-8]\\d{9}$";
NSPredicate *pre = [NSPredicate predicateWithFormat:@"self matches %@",regex];
if ([pre evaluateWithObject:str]) {
NSLog(@"匹配成功");
}
NSString *str = @"13056258745.9";
NSString *regex = @"^[1][3-8]\\d{9}$";
NSPredicate *pre = [NSPredicate predicateWithFormat:@"self matches %@",regex];
if ([pre evaluateWithObject:str]) {
NSLog(@"匹配成功");
}