title: Matching dashes in a URL regex
body: <p>I have used the following regex to get the urls from text (e.g. <code>"this is text http://url.com/blabla possibly some more text"</code>).</p>
  
  <pre><code>'@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@'
  </code></pre>
  
  <p>This works for all URLs but I just found out it doesn't work for URLs shortened like: <code>"blabla bla http://ff.im/-bEnA blabla"</code> becomes <code>http://ff.im/</code> after the match.</p>
  
  <p>I suspect it has to do with the dash <code>-</code> after the slash <code>/</code>.</p>