opml = STDIN.readlines.join opml.scan(/xmlUrl="([^"]*)"/) do |match| m2 = match[0].gsub('&', '&') puts m2 end