From: Paul Mena Date: 2012-12-16T08:10:41+09:00 Subject: print - and strip text between tags using Nokogiri I'm a Ruby Newbie trying to write a program to process thousands of HTML files, extracting pertinent text and inserting it into a MySQL database. Ruby seems ideally suited to the task in general, and I've already used Nokogiri to extract comment text. What I need to do next is to print - and then ultimately delete or strip - the text between "pre" tags. Picture some html like this: My Title

My Heading

From:Me
Date: Wed Dec 05 2012 - 18:17:49 EST

text line 1
text line 2
text line 3

very important text
more important text
would you believe even more important text?

I basically need to do 2 things: 1) to print only the text between the 2 "pre" tags, and then 2) to print all of the non-tagged text between the "body" comments - minus the text between the "pre" tags. I've been messing with this for a couple of hours - unsuccessfully - but I'm still convinced that this is the right tool for the job. -- Posted via http://www.ruby-forum.com/.