permaculture playing cards*
The moose likes Beginning Java and the fly likes look for an reg expression to Remove HTML Tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "look for an reg expression to Remove HTML Tags " Watch "look for an reg expression to Remove HTML Tags " New topic
Author

look for an reg expression to Remove HTML Tags

Hui Zhao
Ranch Hand

Joined: Jul 09, 2007
Posts: 116

But IT seems to be wrong.
for ex.

I want to get

Thanks!
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Your regex is matching the entire tag, including everything between the "<" and ">", and replacing that with an empty String. But it sounds like you want to match "<" or "</" or ">" or "/>", and replace only these with empty Strings.

Does that make sense?


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: look for an reg expression to Remove HTML Tags