• Post Reply Bookmark Topic Watch Topic
  • New Topic

Remove HTML tags from a text file?  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any suggestions on an easy way to remove html tags from a text file? The only thing I can think of it to list the tags in an array and then replace occurences of them in the text file with nothing.
 
Bartender
Posts: 9454
12
Linux Mac OS X Windows
 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
proper html only contains < and > for the tags, otherwise < and > are used. so you could just look for the '<' and stop appending until you see '>'.
 
Timmy Marks
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or that.
 
Yes, my master! Here is the tiny ad you asked for:
The WEB SERVICES and JAX-RS Course
https://coderanch.com/t/690789/WEB-SERVICES-JAX-RS
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!