标签:
//对邮箱的输入进行判断
NSString *emailCheck =@"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}";
NSPredicate *emailTest = [NSPredicatepredicateWithFormat:@"SELF MATCHES%@",emailCheck];
if ([emailTestevaluateWithObject:fieldOldPwd.text])
{
NSLog(@"邮箱格式正确");
}else
{
NSLog(@"邮箱格式错误");
}
标签:
原文地址:http://blog.csdn.net/zwj9161111/article/details/51363653