static public bool IsEmail(string email)
{
string pattern = @"^\w+([-+.]\w*)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$";
return Regex.IsMatch(email, pattern);
}
时间: 2025-01-07 10:25:36
static public bool IsEmail(string email)
{
string pattern = @"^\w+([-+.]\w*)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$";
return Regex.IsMatch(email, pattern);
}