- NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}";
- NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES%@",emailRegex];
- return [emailTest evaluateWithObject:email];
网上看到的,未验证,仅供参考
转载于:https://www.cnblogs.com/vagrantatbeijing/p/3432010.html