Javascript regex replace if the matched string length is greater than limit specified
<p>I am using javascript regex to add a html markup for all the urls found like:</p>

<pre><code> var exp = /(((|www\.|(http|https|ftp|news|file)+\:\/\/)[&amp;#95;.a-z0-9-]+\.[a-z0-9\/&amp;#95;:@=.+?,##%&amp;~-]*[^.|\'|\# |!|\(|?|,| |&gt;|&lt;|;|\)]))/ig;

popupText =  popupText.replace(exp , "&lt;font color='red'&gt;"+"&lt;b&gt;$&amp;&lt;/b&gt;"+"&lt;/font&gt;" ); 
</code></pre>

<p>Now the problem is i want to make sure that it will word if the url found length is greater than 20 characters</p>

<p>See <strong>$&amp;</strong> gets the match string i need to add a filter/check to gets its length.</p>

<p>Any help is appreciated</p>
