Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim client As WebClient = New WebClient()
Label1.Text = client.DownloadString("http://localhost:81/test/index.html")
Label2.Text = Label1.Text
Dim input As String = Label1.Text
Dim output As String = Regex.Replace(input, "<body>|</body>|<html>|</html>", "")
Label2.Text = output
End Sub
I'm downloading the website and storing in the label1. Transferring it into label2(for testing) as I need to replace label1 with text.
The HTML file(test file). I need to get the link out without any new lines created after or before the link.
<html>
<body>
http://www.google.com
</body>
</html>
How can I only display
http://www.google.com
in a label? Tried replacing it with Nothing
and it gives an error.