How to extract only first url from text with javascript
<p>I have this regexp </p>

<pre><code>function isValidURL(text) {

        var RegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&amp;%@!\-\/]))?/;

        ......

    }
</code></pre>

<p>And text is: Please use <a href="http://google.com" rel="nofollow">http://google.com</a> or if nothing was found ask your question on <a href="http://stackoverflow.com">http://stackoverflow.com</a></p>

<p>And i need to extract only first url from text below. (http://google.com)</p>

<p>return as url</p>
