protected bool EvaluateIsValid()
{
string val = txtEmail.Text;
string pattern = @"^[a-z][a-z|0-9|]*([_][a-z|0-9]+)*([.][a-z|0-9]+([_][a-z|0-9]+)*)?@[a-z][a-z|0-9|]*\.([a-z][a-z|0-9]*(\.[a-z][a-z|0-9]*)?)$";
Match match = Regex.Match(val.Trim(), pattern, RegexOptions.IgnoreCase);
if (match.Success)
return true;
else
return false;
}
No comments:
Post a Comment