G
Greg Ma
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
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