From: Greg Ma Date: 2010-10-19T21:27:56+09:00 Subject: Find block in a long string Hi, I am parsing a rss feed and i am try to extract a specific element from an attribute. The attribute looks like this, and I would like to extract the location from it. "<p>\n <strong>Location:</strong> Columbus, Ohio\n</p>\n\n<" Here is the horrible code I've done, could you help me to make it cleaner :) description.split("\n").each do |ugly| next unless ugly.include?("Location") location = ugly.split("\n")[1].split("gt;").last end Greg -- Posted via http://www.ruby-forum.com/.