Strip or Remove HTML Tags

Published on November 30, 2010, by in linux, osx.




Here is how to easily strip or remove html tags from a file using sed.

(View full post for proper syntax!)

sed -e 's/<[a-zA-Z\/][^>]*>//g' myfile.txt > myfilenew.txt

This will strip tags from any sort of text file (html, csv, txt).

Related posts:

  1. How To Strip EXIF Data
  2. Make website buttons with the Gimp
  3. Make PDF forms with OpenOffice.org

One Response

  1. Mike

    Finally one that works for me! Thanks buddy.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Home linux Strip or Remove HTML Tags
© Copyleft scottlinux.com CC BY-SA 3.0