This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
Similar Threads
Reading the META tag in a Servlet
Is this possible to get opener windows innertexts
Logout problem.
java script Tree Code
removing a sequence from ANY string