string Email = this.txtemial.Text.Trim();
Regex reg = new Regex(@"^\w{1,}.{0,}\w{1,}@\w+(\.\w+)+$");
if (!reg.IsMatch(Email))
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "alert('邮箱格式不正确!');", true);
return;
}
正则判断邮件格式
最新推荐文章于 2022-06-24 21:33:02 发布