iOS开发——判断邮箱格式

//判断邮箱格式

-(BOOL)isValidateEmail:(NSString *)email {

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];

}

上一篇:[每日一题] OCP1z0-047 :2013-08-18 禁用启用约束――主键与外键 ..................................61


下一篇:并查集(图论) LA 3644 X-Plosives