I use this
@\"^([\\w\\.\\-]+)@([\\w\\-]+)((\\.(\\w){2,3})+)$\"
regexp to validate the email
([\\w\\.\\-]+)
- this is f
I've created a FormValidationUtils class to validate email:
public static class FormValidationUtils
{
const string ValidEmailAddressPattern = "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$";
public static bool IsEmailValid(string email)
{
var regex = new Regex(ValidEmailAddressPattern, RegexOptions.IgnoreCase);
return regex.IsMatch(email);
}
}