yap, I've done it with regular expressions. Check out
http://jakarta.apache.org for regexp and ORO

the regexp scriptlet is: 

String myHTML="<b>Bold</b>";
RE r = new RE("<[^>]+>");
String cleanText = r.subst(myHTML,"");


cleanText.equals("Bold") should return true

HTH

JP

> -----Original Message-----
> From: Boris Erukhimov [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 21, 2001 6:23 AM
> To: Orion-Interest
> Subject: Off topic : Conversion HTML to a plain text
> 
> 
> Hello everybody,
> 
> My aplication produces HTML e-mail attachment, but because of 
> some e-mail client hassle I need to duplicate the content as 
> a plain text placed in the message body.
> To do this I need some quick and dirty solution to present 
> HTML file (which is built already) as a plain text simular to 
> what browser does when asked "Save as plain text". I can 
> probably develop something like that using 
> javax.swing.text.html but I hoped somebody did it already (?)
> 
> Thanks
> 
> 
> 

Reply via email to