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]

Reply via email to