<%
Dim strFileName
strFileName = Server.MapPath("/demos/asp.net.html")
Dim objFSO, objTS, strHTML
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objTS = objFSO.OpenTextFile(strFileName)
strHTML = objTS.ReadAll
objTS.Close
Set objTS = Nothing
Set objFSO = Nothing
Dim objRegExp
Set objRegExp = new RegExp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<a\s+href=""http://(.*?)"">\s*((\n|.)+?)\s*</a>"
For Each objMatch in objRegExp.Execute(strHTML)
Response.Write("<li>http://" & objMatch.SubMatches(0) & "<br>")
Next
Set objRegExp = Nothing
%>
|