好些人跟我要這段東西,其實是個很簡單的程式碼,下邊就是,自己拿去改成函數呼叫就可
dim strA,strB,isOK
strA = test,you,fuck,money'需要過濾的關鍵字內容
strB = fasfaefwTestfajkewhfwiTuckjfksajfheyou'待檢查的內容
isOK = False'判斷是否含有待過濾內容,若回True即為含有,False就是沒有
dim RegExp
set RegExp=new RegExp
RegExp.IgnoreCase =False
RegExp.Global=True
dim i,j
j = ubound(split(strA,,))
for i=0 to j
RegExp.Pattern=(&split(strA,,)(i)&)
if(RegExp.Test(strB))then
isOK=True
exit for
end if
next
set RegExp=Nothing
response.write(isOK)