Regex reg = new Regex("^([a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]){1,70}$"); if (!reg.IsMatch(txtEmail.Text)) { //Show error message. } else { //Success. }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)