Extracts the actual address of all pictures in a Web page or body content, and returns a list of pictures separated by |.
<%
Option Explicit
' Get all the picture addresses of the content of the article body
Function formatimg (content)
Dim Re,mm,match1,getimgs
Set re=new REGEXP
Re. IgnoreCase =true
Re. Global=true
Re. Pattern= "]*src (=) (. [ ^>]*) > "
Set Mm=re. Execute (content)
For each Match1 in mm
Getimgs=getimgs&imgurl (match1.value) & ""
' Getimgs=imgurl (Match1.value)
' Exit for
Next
Set re = Nothing
formatimg = Server. HTMLEncode (GETIMGS)
End Function
Function Imgurl (str)
Dim tmpstr
If InStr (str, "src=") >0 Then
TMPSTR = Split (str, "src=") (1)
If InStr (Tmpstr, "" "") >0 Then
TMPSTR = Split (Tmpstr, "" "") (1)
End If
If InStr (Tmpstr, "'") >0 Then
TMPSTR = Split (Tmpstr, "'") (1)
End If
Else
Tmpstr = ""
End If
Imgurl = Tmpstr
End Function
Response.Write formatimg ("<p> Arisisi Web Development Home </p><script src=" "Http://www.alixixi.com/ads/ads.asp" ></script><div><" Center><a target= "_blank" "href=" "I4.gif" "></a><br/> Arisisi Web Development Home <br/></center></div> ")
%>