Strip tags in a Vim buffer

11:34, Friday November 24th, 2006 • feeling relaxed

Before I forget this, here's a simple Vim command to strip XML or HTML tags from a buffer. The expression is non-greedy and catches tags that span multiple lines.

:%s/<\_.\{-1,\}>//g

Permanent link

If you would like to link to this entry, it will always be available at http://aftnn.org/journal/624.

aftnn.orgafternoon's journal → entry 624