//验证
string strFileName = "S_123456_200701.zip"
System.Text.RegularExpressions.Regex strReg = new
System.Text.RegularExpressions.Regex(@"^S_d{6}_d{6}.zip$");
if (strReg.IsMatch(strFileName))
{
Response.Write("ok");
}
else
{
Response.Write("sorry");
}
http://www.cnblogs.com/freeliver54/archive/2007/01/18/623668.html