初次接觸C#的服務器端正則表達式相關驗證
后續將會在這個基礎上
將這個C#的服務器端正則表達式相關內容 集結在這里
入門示例如下
//驗證
string strFileName = "S_123456_200701.z 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.49028c.com/freeliver54/archive/2007/01/18/623668.html
新聞熱點
疑難解答