Skip to content

Instantly share code, notes, and snippets.

@tadman
Created January 31, 2017 00:07
Show Gist options
  • Save tadman/93e0764fe8975ec74cd2e08643941c02 to your computer and use it in GitHub Desktop.
Save tadman/93e0764fe8975ec74cd2e08643941c02 to your computer and use it in GitHub Desktop.
require 'nokogiri'
doc = Nokogiri::HTML(DATA)
doc.css('head').remove
puts doc.to_s
__END__
<html>
<head>
<title>Sample Title</title>
</head>
<body>
Test content
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment