From: "Abir B." Date: 2009-07-24T07:06:28+09:00 Subject: Extract alphanumeric text from a string Hello I have a string extracted from a news flow wich contains heteregenous parts. I need to extract the part wich represents a natural text (the content of the summary). I don't know how to do this, but I guess I must apply a regular expression?? this two exemples of the flow : "summary":{"direction":"ltr","content":"Voters' hopes for the Iraqi Kurdistan elections"},"likingUsers":[],"comments":[],"annotations":[],"origin":{"streamId":"feed/http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml","title":"BBC News | News Front Page | World Edition","htmlUrl":"http://news.bbc.co.uk/go/rss/-/2/hi/default.stm"}} => Here I want to extract "Voters' hopes for the Iraqi Kurdistan elections" "summary":{"direction":"ltr","content":"Microsoft's disappointing fiscal fourth-quarter results reflect a sharp slowdown in software sales as demand for new personal computers wanes in the recession.

\n here : "Microsoft's disappointing fiscal fourth-quarter results reflect a sharp slowdown in software sales as demand for new personal computers wanes in the recession sometimes the summary don't contain any text ... so I must return an empty string Thanks -- Posted via http://www.ruby-forum.com/.