asp.net中验证邮箱格式的正则表达式在ashx文件中怎么写?

2025-02-24 11:33:02
推荐回答(2个)
回答1:

^\w+@\w+\.\w+$

回答2:

public bool isEmail(string input)
{
Regex regEmail = new Regex("^[\\w-]+@[\\w-]+\\.(com|net|org|edu|mil|tv|biz|info)$");
Match m = regEmail.Match(input);
return m.Success;
}