471,339 Members | 1,193 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,339 software developers and data experts.

convert html-string to plain text-string

hi

is there a simple way to convert a html-string to a plain text-string?

thanks
Nedo

Jul 26 '05 #1
4 2185
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
Jul 27 '05 #2
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

Jul 27 '05 #3
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


Jul 27 '05 #4

ok, thank you!

Nedo

Jul 28 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by lawrence | last post: by
12 posts views Thread by kevin bailey | last post: by
1 post views Thread by Tony Gambee | last post: by
6 posts views Thread by PenguinPig | last post: by
1 post views Thread by =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?= | last post: by
5 posts views Thread by Damiano | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.