📄 label.vbs
字号:
Function LableFilter(byval Content)
Dim regEx,Match,Match2,strTemp,strTemp2,Matches
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Global = True
regEx.Pattern = "\<IMG(.[^\<]*)\$\>"
Set Matches = regEx.Execute(Content)
For Each Match In Matches
regEx.Pattern = "\#(.*)\#"
Set strTemp = regEx.Execute(Match.Value)
For Each Match2 In strTemp
strTemp2 = Replace(Match2.Value, "&", "&")
strTemp2 = Replace(strTemp2, "#", "")
strTemp2 = Replace(strTemp2, "$}", "%}")
strTemp2 = Replace(strTemp2,"&13;&10;",vbCrLf)
strTemp2 = Replace(strTemp2,"&9;",vbTab)
strTemp2 = Replace(strTemp2, "[!", "<")
strTemp2 = Replace(strTemp2, "!]", ">")
Content=Replace(Content, Match.Value, strTemp2)
Next
Next
Set regEx = Nothing
'Content = Replace(Content,"[$channelid$]","{%channelid%}")
'Content = Replace(Content,"[$classid$]","{%classid%}")
LableFilter=Content
End Function
Function ShiftCharacter(ByVal Content)
Dim regEx, Match, Matches, strTemp,arrMatch, strMatch, i
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Global = True
'Content = Replace(Content,"{%channelid%}","[$channelid$]")
'Content = Replace(Content,"{%classid%}","[$classid$]")
'图片替换JS
regEx.Pattern = "(\<" & "Script)(.[^\<]*)(\<\/Script\>)"
Set Matches = regEx.Execute(Content)
For Each Match In Matches
strTemp = Replace(Match.Value, "<", "[!")
strTemp = Replace(strTemp, ">", "!]")
strTemp = Replace(strTemp, "'", """")
strTemp = "<IMG alt='#" & strTemp & "#' src=""Images/Template/Js.gif"" border=0 $>"
Content = Replace(Content, Match.Value, strTemp)
Next
'图片替换超级标签
regEx.Pattern = "({\$ShowArticle|{\$ShowSoft|{\$ShowPhoto|{\$ShowMovie|{\$ShowProduct|{\$ShowPicArticle|{\$ShowPicSoft|{\$ShowPicPhoto|{\$ShowPicMovie|{\$ShowPicProduct)\((.[^{\$}]*)\)}"
Content = regEx.Replace(Content, "<IMG alt='#$1($2)$}#' src=""Images/Template/Label.gif"" border=0 $>")
'图片替换其它标签(带参数的)
regEx.Pattern = "{\$\((.[^{\$}]*)\)}"
Set Matches = regEx.Execute(Content)
For Each Match In Matches
if Instr(Match.Value,"(")>0 and Instr(Match.Value,")")>0 then
strTemp = Replace(Match.Value, "<", "[!")
strTemp = Replace(strTemp, ">", "!]")
strTemp = "<IMG alt='#" & Match.Value & "#' src=""Images/Template/Label2.gif"" border=0 $>"
Content = Replace(Content, Match.Value, strTemp)
end if
Next
Set regEx = Nothing
ShiftCharacter = Content
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -