title: url validation jquery using regex
body: <p>I want to validate URL field something like below -</p>
  
  <ol>
  <li><a href="http://www.example.com" rel="nofollow">http://www.example.com</a></li>
  <li><a href="http://example.com" rel="nofollow">http://example.com</a></li>
  <li>www.example.com</li>
  </ol>
  
  <p>First two are validation using below regex - </p>
  
  <pre><code>function is_valid_url(url) {
      return /^http(s)?:\/\/(www\.)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(url);
  }
  </code></pre>
  
  <p>but, when i am putting scenario 3 in textbox it showing me invalid URL. </p>
  
  <p>Any help will be highly appreciated.</p>
  
  <p>Thanks in Advance </p>
  
  <p>Amod</p>