require 'uri'text = %{"testhttp://www.example.com/, and be sureto check out my weblog at http://www.example.com/blog/. Email me at href="mailto:bob@example.com">b@e.com.}URI.extract(text, ['http', 'https'])