Robo wrote:
> channelBlocks = s.scan(/<table width=\"132\" border=\"0\" cellpadding=\"0\"
> cellspacing=\"0\">(.*?)<\/table>/)
> 
> channelBlocks.each do |s|
>     puts s
> end
> 
> But it doesn't work, is it because the match is span across multiple lines
> in the HTML? If so, what's the best method to solve it?

Yes, it is due to the multiple lines. Try

channelBlocks = Regexp.new( 
 '<table width="132" border="0" cellpadding="0"
cellspacing="0">(.*)</table>', 
 Regexp::MULTILINE 
)

Watch out for greed and nested tables, though. 

I gave up on trying to make the literal Regexp work, escaping things by
hand is a real chore. :-P

HTH

-- 
(\[ Kent Dahl ]/)_    _~_    __[ http://www.stud.ntnu.no/~kentda/ ]___/~
 ))\_student_/((  \__d L b__/  NTNU - graduate engineering - 5. year  )
( \__\_?|?_/__/ ) _)Industrial economics and technological management(
 \____/_?_\____/ (____engineering.discipline_=_Computer::Technology___)