What is a good way to find URL's in a string that may or may not be preceded by HTTP or HTTPS?
For example:
Here is some text. It has one url here: www.example.com. It also has other link
that goes to http://foo.bar.net and then some more text.
What is a good way to find the URL's?
I am mostly concerned about ".com", ".net", ".org", ".gov", ".edu", and ".us".
I am using Ruby 1.9.3.