gJam,
str = 'http:\/\/www.sitename.domain\/dir\/dir2\/file.jpg \
http:\/\/www.sitename.domain\/dir\/file.jpg \
dasd.asdas\/~sad.js \
sub.sitename.domain\/dir\/dir2\/file.jpg \
site.do/file.pjg \
htttp:\/\/google.com\/ansdjnaskd\/najskd\/inasd.jf \
https:\/\/go.do\/dir\/file.png \
site.do/file/pjg polly \
ftp:\/\/site.dom\/file.blah_blah'
reg = /(^|\s)(((https?)|(ftp)):\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})(\/[~\w\.-]*)*\/?/gim
alert(str.match(reg).join('\n'))