Here is a small sample, using a simple regex expression that displays everything within the <a href=...> block (not including the link description and closing </a> tag), so you can see that it is parsing the right stuff... I do notice that yahoo has some weird links in there, as you will see if you run this sample. This can be easily modified to not include the beginning "<a href=" and the ending ">", but the below is so you can see full text that it is matching on...
VB Code:
Dim returnstring As String returnstring = SearchPage("http://www.yahoo.com") Dim Regex As New System.Text.RegularExpressions.Regex("<a href=.*?>") Dim Mymatches As System.Text.RegularExpressions.MatchCollection = Regex.Matches(returnstring) For Each FoundMatch As System.Text.RegularExpressions.Match In Mymatches MsgBox(FoundMatch.Value) Next MessageBox.Show("done!")




Reply With Quote