title: check if string contains url anywhere in string using javascript
body: <p>I want to check if string contains a url using javascript i got this code from google </p>
  
  <pre><code>        if(new RegExp("[a-zA-Z\d]+://(\w+:\w+@)?([a-zA-Z\d.-]+\.[A-Za-z]{2,4})(:\d+)?(/.*)?").test(status_text)) {
            alert("url inside");
          }
  </code></pre>
  
  <p>But this one works only for the url like <a href="http://www.google.com" rel="noreferrer">"http://www.google.com"</a> and <a href="http://google.com" rel="noreferrer">"http://google.com"</a> but it doesnt work for <a href="http://www.google.com" rel="noreferrer">"www.google.com"</a> .Also i want to extract that url from string so i can process that url.</p>