Regular matching (regular expression) mode performs data matching and replacement copy code. The code is as follows:
<%
'/* Function name: Zxj_ReplaceHtml ClearHtml
'/* Function language: VBScript Language
'/* Function: Clear file HTML format function
'/* Pass parameters: Content (note: content that needs to be cleared)
'/* Function author: Zhang Xiaojun (Fairy Tale of the Ancient City) QQ:382511147
'/* Function description: Regular matching (regular expression) pattern for data matching and replacement
Function ClearHtml(Content)
Content=Zxj_ReplaceHtml(&#[^>]*;, , Content)
Content=Zxj_ReplaceHtml(</?marquee[^>]*>, , Content)
Content=Zxj_ReplaceHtml(</?object[^>]*>, , Content)
Content=Zxj_ReplaceHtml(</?param[^>]*>, , Content)
Content=Zxj_ReplaceHtml(</?embed[^>]*>, , Content)
Content=Zxj_ReplaceHtml(</?table[^>]*>, , Content)
Content=Zxj_ReplaceHtml( ,,Content)
Content=Zxj_ReplaceHtml(</?tr[^>]*>, , Content)
Content=Zxj_ReplaceHtml(</?th[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?p[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?a[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?img[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?tbody[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?li[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?span[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?div[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?th[^>]*>, , Content)
Content=Zxj_ReplaceHtml(</?td[^>]*>, , Content)
Content=Zxj_ReplaceHtml(</?script[^>]*>, , Content)
Content=Zxj_ReplaceHtml((javascript|jscript|vbscript|vbs):, , Content)
Content=Zxj_ReplaceHtml(on(mouse|exit|error|click|key), , Content)
Content=Zxj_ReplaceHtml(<//?xml[^>]*>, , Content)
Content=Zxj_ReplaceHtml(<//?[az]+:[^>]*>, , Content)
Content=Zxj_ReplaceHtml(</?font[^>]*>, , Content)
Content=Zxj_ReplaceHtml(</?b[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?u[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?i[^>]*>,,Content)
Content=Zxj_ReplaceHtml(</?strong[^>]*>,,Content)
ClearHtml=Content
End Function
Function Zxj_ReplaceHtml(patrn, strng,content)
IF IsNull(content) Then
content=
End IF
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = patrn ' Set pattern.
regEx.IgnoreCase = true ' Set to ignore character case.
regEx.Global = True ' Set global availability.
Zxj_ReplaceHtml=regEx.Replace(content,strng) 'Perform regular matching
End Function
%>