PC Review


Reply
Thread Tools Rate Thread

convert html-string to plain text-string

 
 
Nedo
Guest
Posts: n/a
 
      26th Jul 2005
hi

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

thanks
Nedo

 
Reply With Quote
 
 
 
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      27th Jul 2005
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


 
Reply With Quote
 
Nedo
Guest
Posts: n/a
 
      27th Jul 2005
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

 
Reply With Quote
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      27th Jul 2005
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




 
Reply With Quote
 
Nedo
Guest
Posts: n/a
 
      28th Jul 2005

ok, thank you!

Nedo

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert doc, xls, pdf, rtf to plain Text (string) - I will pay for Frank Uray Microsoft C# .NET 1 12th Dec 2008 10:28 PM
Convert doc, xls, pdf, rtf to plain Text (string) Frank Uray Microsoft C# .NET 0 22nd Oct 2008 12:23 PM
Convert plain text string to HTML Dennis Microsoft VB .NET 6 4th Jan 2007 12:37 PM
Get the plain text from html string =?Utf-8?B?R2FyeQ==?= Microsoft C# .NET 3 14th Nov 2006 09:29 AM
regex for replacing plain text within html string... Tim_Mac Microsoft ASP .NET 2 21st Jan 2006 12:13 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:43 PM.