title: Regular Expression to find URLs in block of Text (Javascript)
body: <p>I need a Javascript regular expression that scans a block of plain text and returns the text with the URLs as links.</p>
  
  <p>This is what i have:</p>
  
  <pre>
  findLinks: function(s) {
            var hlink = /\s(ht|f)tp:\/\/([^ \,\;\:\!\)\(\"\'\\f\n\r\t\v])+/g;
            return (s.replace(hlink, function($0, $1, $2) {
                s = $0.substring(1, $0.length);
                while (s.length > 0 && s.charAt(s.length - 1) == '.') s = s.substring(0, s.length - 1);
  
                return ' ' + s + '';
            }));
        }
  </pre>
  
  <p>the problem is that it will only match <strong><a href="http://www.google.com" rel="nofollow noreferrer">http://www.google.com</a></strong>
  and NOT <strong>google.com/adsense</strong></p>
  
  <p>How could I accomplish both?</p>