Imports System.Collections
Public Class MainClass
Public Function ParseImages(ByVal HTML As String) As ArrayList
Dim objRegEx As System.Text.RegularExpressions.Regex
Dim objMatch As System.Text.RegularExpressions.Match
Dim arrLinks As New System.Collections.ArrayList()
objRegEx = New System.Text.RegularExpressions.Regex( _
"img.*src\s*=\s*(?:""(?<1>[^""]*)""|(?<1>\S+))", _
System.Text.RegularExpressions.RegexOptions.IgnoreCase Or _
System.Text.RegularExpressions.RegexOptions.Compiled)
objMatch = objRegEx.Match(HTML)
While objMatch.Success
Dim strMatch As String
strMatch = objMatch.Groups(1).ToString
arrLinks.Add(strMatch)
objMatch = objMatch.NextMatch()
End While
Return arrLinks
End Function
End Class