From: Robert Klemme Date: 2009-03-28T19:55:04+09:00 Subject: Re: Regular Expression interesting problem On 28.03.2009 11:00, Eric Hodel wrote: > PS: You'll probably want to do something like scan for <, then scan > for a tag name, then scan for attributes, then scan for >, etc. I'd probably rather scan for each tag and then analyze it, i.e. doc.scan %r{]*>}i do |link| if %r{(?i:type)=["']application/rss\+xml["']} =~ link ... end end Note that the scanning RX is weak. But I agree, rather use the proper tool for the job. Cheers robert