目前還是有BUG的
正則分析頁面在:
發現BUG請在後面留言
src=後面有空格不能正確匹配
src=
發現BUG: 圖片路徑有多個空格時只能保留一個
圖片路徑有多個空格時只能保留一個的BUG
<%
Function getIMG(sString)
Dim sReallyDo
Dim oMatches
iReallyDo =
ReDim aReallyDo(iReallyDo)
If IsNull(sString) Then
getIMG = aReallyDo
Exit Function
End If
sReallyDo = sString
On Error Resume Next
sReallyDo = Replace(sReallyDo
sReallyDo = Replace(sReallyDo
sReallyDo = Replace(sReallyDo
sReallyDo = Replace(sReallyDo
sReallyDo = Replace(sReallyDo
sReallyDo = ReplaceAll(sReallyDo
sReallyDo = ReplaceAll(sReallyDo
sReallyDo = Replace(sReallyDo
sReallyDo = Trim(sReallyDo)
Set regEx = New RegExp
regEx
regEx
regEx
sReallyDo = regEx
regEx
sReallyDo = regEx
regEx
Set oMatches = regEx
For Each cMatch in oMatches
iReallyDo = iReallyDo +
ReDim PReserve aReallyDo(iReallyDo)
aReallyDo(iReallyDo) = regEx
Next
getIMG = aReallyDo
End Function
%>
<%
sContent = "HTML代碼字段"
Dim aImages : aImages = GetImg(sContent)
For i =
Response
Next
If UBound(aImages)>
If UBound(aImages)>
%>
From:http://tw.wingwit.com/Article/program/net/201311/14392.html