Mega Code Archive
Categories
/
Ruby
/
Network
Get only http and https based url
require 'uri' text = %{"test
http://www.example.com/
, and be sure to check out my weblog at http://www.example.com/blog/. Email me at
b@e.com
.} URI.extract(text, ['http', 'https'])