This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

look for an reg expression to Remove HTML Tags  RSS feed

 
Hui Zhao
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

But IT seems to be wrong.
for ex.

I want to get

Thanks!
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!