//利用正則表達式驗證郵箱地址合法性正則表達式
-(BOOL)isValidateEmail:(NSString *)email {lua
NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}";spa
NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegex];orm
return [emailTest evaluateWithObject:email];it