I\'m trying to check if some email address is correct with the following code :
NSPredicate *regexMail = [NSPredicate predicateWithFormat:@\"SELF MATCHES \'.*@.*
This page has a good explanation of using regular expressions to validate email, as well as some regexes:
http://www.regular-expressions.info/email.html
Their expression:
[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
Seems to be the best tradeoff between thoroughness and correctness.