导入using System.Text.RegularExpressions;
protected void TextBox4_TextChanged(object sender, EventArgs e)
{
Regex EmailExpression = new Regex(@"[\d]{6}(19|20)*[\d]{2}((0[1-9])|(11|12))([012][\d]|(30|31))[\d]{3}[xX\d]*", RegexOptions.Singleline | RegexOptions.Compiled);
if (EmailExpression.IsMatch(TextBox4.Text))
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "", "");
return;
}
}