/*手机号码验证 MODIFIED BY HELENSONG*/ + (BOOL) isValidateMobile:(N
sstring *)mobile { //手机号以13, 15,18开头,八个 \d 数字字符 N
sstring *phoneRegex = @"^((13[0-9])|(147)|(15[^4,\\D])|(18[0-9]))\\d{8}$";
nspredicate *phoneTest = [
nspredicate predicateWithFormat:@"SELF MATCHES %@",phoneRegex]; // //NSLog(@"phoneTest is %@",phoneTest); return [phoneTest evaluateWithObject:mobile]; } //匹配Email地址的正则表达式:^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$ // + (BOOL)isRightEmail:(N
sstring *)str { N
sstring *phoneRegex = @"^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,2})$";
nspredicate *phoneTest = [
nspredicate predicateWithFormat:@"SELF MATCHES %@",phoneTest); return [phoneTest evaluateWithObject:str]; } //17位 最后4位必须是数字 - (BOOL)isRightCarUniqueNumber:(N
sstring *)str { N
sstring *phoneRegex = @"^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,phoneTest); return [phoneTest evaluateWithObject:str]; }