Possible Duplicate:
Regex to match URL
I know regexp should be able to do this but I can't figure out how to do it. I wan't to be able to search through a string of text and return only the url's. How would you do this in PHP?
Example
hello there everyone visit this link: http://google.com and this one as well http://amazon.com
would return:
Any ideas?