[code=vbnet]

Imports System.Text.RegularExpressions
 
Public Class Form1
 
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
        TextBox1.Clear() : TextBox2.Clear()
        Dim MyWebClient As New System.Net.WebClient()

        '// --------------------------------------------------
        '//        Enkel als je achter een proxy zit !!!
        '//        Anders mag je de code hieronder in
        '//        commentaar zetten
        '// --------------------------------------------------
        Dim MyCredentials As New Net.NetworkCredential
        With MyCredentials
            .UserName = "**********"
            .Password = "**********"
        End With
 
        Dim MyWebProxy As New Net.WebProxy
        With MyWebProxy
            .Address = New Uri("***********************")
            .Credentials = MyCredentials
            .BypassProxyOnLocal = True
        End With
 
        MyWebClient.Proxy = MyWebProxy
        '// --------------------------------------------------
 
        TextBox1.Text = MyWebClient.DownloadString("http://www.sitemasters.be")
 
        '// Via Regex alle gevonden url's in een textbox stoppen
 
        Dim RegexPattern As String = "http(s)?://([\w+?\.\w+])+([a-zA-Z0-9\~\!\@\#\$\%\^\&amp;\*\(\)_\-\=\+\\\/\?\.\:\;\'\,]*)?"
 
        Dim mobileRegex As Regex = New Regex(RegexPattern)
        Dim allMatches As MatchCollection = mobileRegex.Matches(TextBox1.Text)
        For Each match As Match In allMatches
            TextBox2.Text &= match.Value & vbCrLf
        Next
 
    End Sub
 
     
End Class
