System.Text.RegularExpressions.Regex expr;
public bool email(string email)
{
expr =new Regex(@"^[a-zA-Z][\w\.-]{2,28}[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$");
if (expr.IsMatch(email))
{
return true;
}
else return false;
}
public bool phone(string no)
{
expr = new Regex(@"^((\+){0,1}91(\s){0,1}(\-){0,1}(\s){0,1}){0,1}9[0-9](\s){0,1}(\-){0,1}(\s){0,1}[1-9]{1}[0-9]{7}$");
if (expr.IsMatch(no))
{
return true;
}
else return false;
}