olor=red size=3>" & errstr & "</font>" & vbCrLf)
Call Class_Terminate
End Sub
Private Sub Class_Terminate '' 设置 Terminate 事件。
End Sub
''定义两个内部变量
Private myGlobal
Private myIgnoreCase
End Class
%>
<html>
<body>
<div align=center><h2>范例1</h2></div>
<%
''范例1
Dim input , result
input = "<i>这是</i>一个<font color=green>VBScript</font>的<b>正则<i>表达式</i>范例</b>。"
Set hp = New HTMLParse
hp.Global = 1
hp.IgnoreCase = False
result = hp.Parse(input)
Response.Write(result)
%>
<br>
<div align=center><h2>范例2</h2></div>
<%
''范例2
''hp.Global = 1
''hp.IgnoreCase = False
result2 = hp.ParseTag(input,"i")
Response.Write(result2)
Set hp = Nothing
%>
</body>
</html>
大家应该注意到了,VBScript的正则表达式和Jscript的解析是一样的,只是语法不同。关于最新的VBScript的文档,大家
可以到微软中国的脚本技术主页去下载,网址:http://www.microsoft.com/china/scripting |