convert html-string to plain text-string

  • Thread starter Thread starter Nedo
  • Start date Start date
Nedo,
is there a simple way to convert a html-string to a plain text-string?
In my opinion do you have to explain this more, because a html-string is a
plain text-string?

Cor
 
ok:
i have a string with this content:
<html>
<head>
....
</head>
<body>
text text text <br> text text <br>
<a href="link">link</a>

</body>
</html>

so what i want is a method to convert the string above in this one:
text text text
text text
link

i hope you understand now

thanks
Nedo
 
Nedo,

Your HTML sample is absolute not clean what can be in reality as well.
However I understand now that you need a regex or a routine that tells

every word that start after > until the next < is reached?

I am absolute no Regex expert.
I can tell it in a routine however I think that Regex is more in it place.

Maybe this links can help you.

RegexLib
http://www.regexlib.com/Default.aspx

Expresso
http://www.ultrapico.com/Expresso.htm

Otherwise maybe somebody who knows better Regex than me can help you. (That
is almost everybody. I have to go to those websides as well to create this)

I hope it helps something.

Cor
 
Back
Top