From: "David A. Black" Date: 2009-02-12T07:48:25+09:00 Subject: Re: regexp problem --1926193751-875137296-1234392581=:5332 Content-Type: MULTIPART/MIXED; BOUNDARY="1926193751-875137296-1234392581=:5332" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1926193751-875137296-1234392581=:5332 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Hi -- On Thu, 12 Feb 2009, w_a_x_man@yahoo.com wrote: > On Feb 11, 11:01�am, Mark Thomas wrote: >> As long as we're being pedagogical, I prefer XPath to all the previous >> posted solutions. >> >> * More accommodating to minor changes in the HTML >> * Very short (one-liner) and easy to read (IMHO) >> >> require 'nokogiri' >> doc = Nokogiri::HTML(html) >> >> puts doc.xpath('// > > // is quite cryptic. It's standard XPath notation. David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2) http://www.wishsight.com => Independent, social wishlist management! --1926193751-875137296-1234392581=:5332-- --1926193751-875137296-1234392581=:5332--