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.

<iframe
src=“http://feedads.g.doubleclick.net/~ah/f/i8hpomaon0k21n7jujntil2004/468/60#http%3A%2F%2Fwww.marketwatch.com%2Fenf%2Frss.asp%3Fguid%3D%257B377DE823-5268-4DA1-9194-FDB657AA15DC%257D%26siteid%3Drss%26rss%3D1”
width=“100%” height=“60” frameborder=“0” scrolling=“no”
marginwidth=“0” marginheight=“0”>

\n<a
href=“http://feeds.marketwatch.com/~ff/marketwatch/topstories?a=_AV98AmZ11c:fu-PHxqGjGM:yIl2AUoC8zA”><img
src=“http://feeds.feedburner.com/~ff/marketwatch/topstories?d=yIl2AUoC8zA”
border=“0”><img
src=“http://feeds.feedburner.com/~ff/marketwatch/topstories?d=qj6IDK7rITs

=> 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs