title: detect url in string
body: <p>I am going to implement regex to catch url in strin. To do so, I have wrote regex expression but it only captures sub-part of expected input not all. How can I fix it so that it can catch all of the expected input and mark them as url?</p>
  
  <p>expected input</p>
  
  <pre><code>ftp://joe:password@ftp.filetransferprotocal.com
  http://www.google.com/search?q=good+url+regex&amp;rls=com.microsoft:*&amp;ie=UTF-8&amp;oe=UTF-8&amp;startIndex=&amp;startPage=1
  https://some-url.com?query=&amp;name=joe?filter=.#some_anchor
  www.some-url.com?query=&amp;name=joe?filter=.#some_anchor
  www.some-url.edu?query=&amp;name=joe?filter=.#some_anchor
  www.some-url.gov?query=&amp;name=joe?filter=.#some_anchor
  www.some-url.co.uk?query=&amp;name=joe?filter=.#some_anchor
  www.some-url.xxx?query=&amp;name=joe?filter=.#some_anchor
  ww2.some-url.com?query=&amp;name=joe?filter=.#some_anchor
  http://en.wikipedia.org/wiki/Björn_Andrésen
  </code></pre>
  
  <p>my code is <code>\(?\bhttp://[-A-Za-z0-9+&amp;@#/%?=~_()|!:,.;]*[-A-Za-z0-9+&amp;@#/%=~_()|]</code></p>