This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remove HTML tags from a text file?

 
Harold Barnes
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.
 
Joe Ess
Bartender
Pie
Posts: 9265
10
Linux Mac OS X Windows
 
Timmy Marks
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic