Why preg_match fails to get the result?
<p>I have the below text displayed on the browser and trying to get the URL from the string. </p>

<p>string 1 = voice-to-text from #switzerland: <a href="http://bit.ly/lnpDC12D" rel="nofollow">http://bit.ly/lnpDC12D</a></p>

<p>When I try to use preg_match and trying to get the URL, but it fails</p>

<pre><code>$urlstr = "";
preg_match('/\b((?#protocol)https?|ftp):\/\/((?#domain)[-A-Z0-9.]+)((?#file)\/[-A-Z0-9+&amp;@#\/%=~_|!:,.;]*)?((?#parameters)\?[A-Z0-9+&amp;@#\/%

=~_|!:,.;]*)?/i', $urlstr, $match);

echo $match[0];
</code></pre>

<p>I think #switzerland: has one more http// ... will it be problem ?</p>

<p>the above split works perfect for the below string,</p>

<p>voice-to-text: <a href="http://bit.ly/jDcXrZg" rel="nofollow">http://bit.ly/jDcXrZg</a></p>
