formats

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).

4 Responses

  1. Mike

    Finally one that works for me! Thanks buddy.

  2. Harsh

    Awesome!

  3. ジョーダン スニーカー

    Finally one that works for me! Thanks buddy.

  4. ナイキ スニーカー

    Awesome!

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