Skip to content

Instantly share code, notes, and snippets.

@snuxoll
Created February 26, 2009 17:56
Show Gist options
  • Save snuxoll/70987 to your computer and use it in GitHub Desktop.
Save snuxoll/70987 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'hpricot'
doc = Hpricot( File.open("file.html") )
(doc / "span.foo").each do |span|
span.swap("***#{span.inner_html}***")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment