title: Validating URL using regex
body: <p>I am trying to validate a URL with just a scheme and domain name (something like <code>http://www.domainname.com</code>). I am using this regex:</p>
  
  <pre><code>/^(http|https):\/\/[\w.\-]+\.[A-Za-z]{2,6}/
  </code></pre>
  
  <p>When I type <code>http://www.ab</code>, up to 6 characters it returns true, after that length it return false. How can I tackle this situation?</p>