From: "Jean-François Trân" Date: 2008-01-19T15:41:44+09:00 Subject: Re: Challenge: Extract episode descriptions. 2008/1/19, Stedwick : > If any of you feel up to the challenge, see if you can streamline my > code below, or write better code yourself. I can't help but think that > there's an easier way to do this! > > # open html file > f = File.read("episode_guide.html") > > # keep track of the number of descriptions found > count = 0 > > # each description is enclosed in a multiline

tag > f.scan(/

.*?<\/p>/m) do |match| [...] You should take a look at Hpricot gem to make the html scraping easier. -- Jean-François.