From: Robo Date: 2003-05-11T08:49:09+09:00 Subject: Re: Extracting text from HTML > Arg, line wrapping was too aggressive there... > > channelBlocks = Regexp.new( > ' 'cellspacing="0">(.*)
', > Regexp::MULTILINE > ) Thanks, just a slight problem, I want it to match from the start of the tag to the next
tag, but I think Ruby matched it with the last tag in the file. In the file, there're 3 of these tables with width 132, I want to extract those three tables. This is what I have so far: file = File.new('your_tv_guide.txt', 'r') s = file.read file.close #puts s regex = Regexp.new( '(.*)
', Regexp::MULTILINE ) channelBlocks = s.scan(regex) channelBlocks.each do |s| puts s end