I have the following code and I want it to check whether or not an email address is in an acceptable format but for some reason the real email addresses I feed it still reply that the email address is invalid. The email address is in string format so unsure as to why I am getting matches.
if (!Regex.IsMatch(u1.EmailAddress, @"\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b"))
{
MessageBox.Show("email is invalid");
}