-1

How can i grab text ONLY from a website html but only the text and not the html?

i want to grab this site

http://kramansro.net/lunia/sites.html

i used this code

TextBox1.Text = WebBrowser2.DocumentText

But when i grab it it comes out like this

sdfasdfad<br>asdfasdfa<br>dfasdf<br>aasd<br>fs<br>dfa<br>sdf<br>asdf<br>asd<br>f<br>as

But i want it to be this:

sdfasdfad
asdfasdfa
dfasdf
aasd
fs
dfa
sdf
asdf
asd
f
as
Austin Mont
  • 73
  • 2
  • 2
  • 8

1 Answers1

0

Well the simplest method for that particular use case would be

TextBox1.Text = WebBrowser2.DocumentText.Replace("<br>", vbCrLf);

If you have more complex HTML, you should look into Regular Expressions.

Jordan
  • 31,971
  • 6
  • 56
  • 67