好些人跟我要这段东西,其实是个很简单的代码,下边就是,自己拿去改成函数调用就可
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)
时间: 2024-10-10 00:40:06