I have used the following regex to get the urls from text (e.g. this is text http://url.com/blabla possibly some more text).
'@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@'
This works for all URLs but I just found out it doesn't work for URLs shortened like: "blabla bla http://ff.im/-bEnA blabla" turns becomes http://ff.im/ after the match.
I suspect it has to do with the dash - after the slash /.
Any help on how to update this regex would be amazing.
Ice