# different ways of making regular expressions google = Regexp.new( "Results.*of about (.*)<\/b>.*Search took" ) yahoo = /.*out of about (.*)  / msn = %r{Results .* of about (.*) containing "' when /\Alt\z/ni then '<' end } end puts unescape( "<html>" ) # matching extraction url = %r{http://(.*):(.*)@(.*)(/.*)} match = url.match( "http://user:password@www.host.com/pathtofile" ) # print pieces pieces = [] match.size.times do | i | puts match[ i ] pieces << match[ i ] end fullurl, username, password, hostname, path = pieces puts <