I should have said I'd like to try to keep the basic whitespace, replacing
<br/> with a return, for example.  I'm feeding it into the comment screen in
a GUI app that only takes plain text, so I can't have one long unbroken
string.

Greg

-----Original Message-----
From: Jeremy Nix [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 4:15 PM
To: Struts Users Mailing List
Subject: RE: [OT] HTML tag stripper


This has worked for me:

Pattern tagPattern = Pattern.compile("</?[^>]*>",
Pattern.CASE_INSENSITIVE);
tagPattern.matcher("YOUR_TEXT_HERE").replaceAll("");


_________________________________
Jeremy Nix
Southwest Financial Services, LTD.
[EMAIL PROTECTED]
(513) 621-6699 ext.1158



-----Original Message-----
From: Greg Dunn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 5:10 PM
To: Struts Users Mailing List
Subject: [OT] HTML tag stripper



Does anyone know of any free Java I can incorporate in my app that will
take a String of HTML and strip the tags out?


Greg


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to