//判断是否是手机号码
+ (BOOL) IsValiddateMobile:(NSString*)pstrMobile
{
// 手机号以13.15.17。18开头
NSString* pPhoneRegex = @"^((13[0-9])|(147)|(15[^4,\\D])|(18[0,0-9])|(17[0,0-9]))\\d{8}$";
NSPredicate* pPhoneTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",pPhoneRegex];
return [pPhoneTest evaluateWithObject:pstrMobile];
}
网友评论