Today, the editor will share with you a simple filtering ad code. Some codes are not very understandable, and many of them are borrowing from others online.
Many people asked me for this piece of work, but it is actually a very simple code. The following is, just change it to a function call yourself.
dim strA, strB, isOK
strA = "test,you,fuck,money" 'Keyword content that needs to be filtered
strB = "fasfaefwTestfajkewhfwiTuckjfksajfheyou" 'Content to be checked
isOK = False 'Just determine whether the content to be filtered is included. If True is returned, it is included. False means there is no
dim RegExp
set RegExp=new RegExp
RegExp.IgnoreCase =False
RegExp.Global=True
dim i,j
j = ubund(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)
The above is a brief introduction to filtering advertising codes. I hope everyone can like it. For more content, please continue to follow the website of the Wuxin Technology Channel!