using System.Text;
using System.Text.RegularExpressions;
public static bool ValidateEmail(string str)
{
if (str == null)
{
return false;
}
else
{
return Regex.IsMatch(str, @"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*");
}
}
Comments