IOS判断邮箱
2016-09-03 本文已影响131人
蜗牛1992
//判断是不是邮箱
+ (BOOL) IsValidateEmail:(NSString *)pEmail{
NSString *pEmailCheck = @"[A-Z0-9a-z._%+-]+@[A-Z0-9a-z.-]+[A-Za-z]{2,4}";
NSPredicate *pEmailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",pEmailCheck];
return [pEmailTest evaluateWithObject:pEmail];
}