Hi,
I am trying to generate a simple search function that reads in the text file (ie html or asp) and then strips out the page content using the function below using vbscript.
<%
Function clearAllTags(s)
Dim re
Set re = New RegExp
re.Pattern = "(<[^>]*>)"
re.Global = True
re.IgnoreCase = True
clearAllTags = re.Replace(s, "")
End Function
%>
However it seems to work fine for some instances but not all pages. It doesnt seem to remove the javascript and fails to remove some of the other asp and html for certain pages.
Does anybody have another solution or know how to adapt the code to remove html,javascript and asp?
Can anybody help?
I am trying to generate a simple search function that reads in the text file (ie html or asp) and then strips out the page content using the function below using vbscript.
<%
Function clearAllTags(s)
Dim re
Set re = New RegExp
re.Pattern = "(<[^>]*>)"
re.Global = True
re.IgnoreCase = True
clearAllTags = re.Replace(s, "")
End Function
%>
However it seems to work fine for some instances but not all pages. It doesnt seem to remove the javascript and fails to remove some of the other asp and html for certain pages.
Does anybody have another solution or know how to adapt the code to remove html,javascript and asp?
Can anybody help?