i want to use the NSRegularExpression
Class to validate if an NSString
is an email address.
Something like this pseudocode:
- (BOOL)validateMail : (NSString *)email
{
NSRegularExpression *expression = [NSRegularExpression regularExpressionWithPattern:@"" options:NSRegularExpressionCaseInsensitive error:NULL];
if(emailValidated)
{
return YES;
}else{
return NO;
}
}
But i don't know how exactly i validate an NSString if it's looking like this one "[email protected]"
Perhaps someone can help me here.
Greetings
s4lfish
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…