Public Sub GetImg() Dim Soruce As String = WebBrowser.Document.Body.OuterHtml Dim search As System.Text.RegularExpressions.MatchCollection = System.Text.RegularExpressions.Regex.Matches(Soruce, "<img\s+[^>]*src\s*=\s*(?:(?<quot>[""'])(?<url>.*?)\k<quot>|" + "(?<url>[^\s>]+))[^>]*>(?<text>.*?)</img>", System.Text.RegularExpressions.RegexOptions.IgnoreCase Or System.Text.RegularExpressions.RegexOptions.Singleline) For Each m As System.Text.RegularExpressions.Match In search Console.WriteLine("URL:{0}", m.Groups("url").Value) Next End Sub
Dim wc As WebBrowser = New WebBrowser Dim Soruce As String = wc.Document.Body.OuterHtml (省略) wc.Dispose()