From: Gavin Kistner Date: 2006-10-07T02:07:44+09:00 Subject: Re: [QUIZ] Posix Pangrams (#97) From: Jamie Macey [mailto:jamie.macey@gmail.com] > > (There's no joy in trying to parse/string HTML.) > Sure there is. > > require 'rubygems'; require 'hpricot'; require 'open-uri' > doc = Hpricot(open('http://www.unix.org/version3/apis/cu.html')) > puts (doc/"p.tent/i").map{|i|i.inner_html} > > Hpricot makes HTML scraping fun again (no, really!). :) I copy/pasted the rows from the table and did it like this: puts <([^<]+)/ ).flatten.join( ' ' ) #HTML HERE ENDS Actually...I can't get Hpricot to install to test your code (gem server seems to be down) but doesn't that grab way more information than you wanted from the table? The table headers and all columns, too?