用于解析链接推文的正则表达式

I found a link in a tweet that my current regex won't parse and I can't seem to figure out how to get it working (probably due to my ineptness with regex).

Here's the current code:

preg_match_all('@((https?://)?([-\w]+\.[-\w\.]+)+\w(:\d+)?(/([-\w/_\.]*(\?\S+)?)?)*)@',$description, $matches, PREG_SET_ORDER);

And the Tweet that won't parse:

Amazon: 14-day lending coming to Kindle "later this year". http://usat.me?128426

It's the usat.me link that's screwing things up. Any thoughts?

((https?://)?([-\w]+\.[-\w\.]+)+\w(:\d+)?((/)?([-\w/_\.]*(\?\S+)?)?)*)

Try that. Should work. modified the / to be (/)? meaning the last slash is supposed to be there 0 or 1 times.

You can try it here, it's working at least for me:

http://www.spaweditor.com/scripts/regex/

You can try this RegEx:

(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))