|
|
|
|
俵ÀÌ / 2003-08-10 / ¿ÀÈÄ 4:54:16 / 203.255.3.190
Á¶È¸¼ö : 166
|
[Áú¹®] [Æۿ±Û] Á¤ÇØÁø ÅÂ±× ¹þ°Ü³»±âx) |
Public Function stripHTML(strHTML)
arrCleanTags = array("h1","h2","h3","h4","h5","h6","p","li","ul","ol","div","td","table","tr","u","b","i")
arrRemoveTags = array("o:p","o:lock","v:(.|\n)+?","span","font", "w:wrap")
'Strips the HTML tags from strHTML
Dim objRegExp, strOutput
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
strOutput = strHTML
for each tag in arrRemoveTags
'Clean startTag
'response.write tag & "<br>"
objRegExp.Pattern = "<"&tag&"(.|\n)+?>"
strOutput = objRegExp.Replace(strOutput, "")
'Clean ensTag
objRegExp.Pattern = "</"&tag&">"
strOutput = objRegExp.Replace(strOutput, "")
next
for each tag in arrCleanTags
'Clean startTag
'response.write tag & "<br>"
objRegExp.Pattern = "<"&tag&" (.|\n)+?>"
strOutput = objRegExp.Replace(strOutput, "<"&tag&">")
'Clean ensTag
objRegExp.Pattern = "</"&tag&">"
strOutput = objRegExp.Replace(strOutput, "</"&tag&">")
next
stripHTML = strOutput 'Return the value of strOutput
Set objRegExp = Nothing
End Function
|
|
|
|