7stud -- wrote:
>
> title_re = Regexp.new(/<title>(.*)<\/title>/)
>

While that regex works for www.google.com, in order for the regex to be 
more general, the regex should be:

title_re = Regexp.new(/<title>(.*)<\/title>/m)

and then to output the match:

puts md_obj[1].strip()
-- 
Posted via http://www.ruby-forum.com/.