Strip <span> tags from HTML in vim
Posted in vim, xhtml on April 6th, 2009 by David – Be the first to commentWhen upgrading a website you might see source code like this:
<span style="font-family: Arial; color: #0000ff; font-size: small;">Some text goes here</span>
You’re using CSS now and all those <span> tags are ruining it. In gvim, do this search and substitute:
%s/<span.\{-}>//g
Then to get rid of the </span> tags, do this:
:%s/<\/span>//g