1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://www.meteo-de-france.info/")
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("<span class=""opt"">.*</span>")
Dim matches As MatchCollection = r.Matches(rssourcecode)
For Each itemcode As Match In matches
MsgBox (itemcode.Value.Split("""").GetValue(3))
Next
End Sub |