ListBox1.Items.Add(itemcode.Value.Split("><").GetValue(0))
Imports System.Text.RegularExpressions Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://oxford.craigslist.co.uk/search/hhh") Dim response As System.Net.HttpWebResponse = request.GetResponse Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream()) Dim rssourcecode As String = sr.ReadToEnd Dim r As New System.Text.RegularExpressions.Regex("class=""hdrlnk"">.*?<") Dim matches As MatchCollection = r.Matches(rssourcecode) For Each itemcode As Match In matches ListBox1.Items.Add(itemcode.Value.Split("><").GetValue(0)) Next End Sub End Class
ListBox1.DataSource = Nothing 'your code here
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)