title: Regex for website or url validation
body: <p>I know this is so common question &amp; there are so many answers for this, but my problem is different, I want to accept the URL with all below formats:</p>
  
  <pre><code>http://www.sample.com
  https://www.sample.com
  http://www.sample.com/xyz
  www.sample.com
  www.sample.com/xyz/#/xyz
  sample.com
  
  // &amp; much more ...
  </code></pre>
  
  <p>So here idea is, I am allowing the user to enter there website &amp; another user can just click on the saved website &amp; go to users website. So here it's not a good idea to restrict the user to input proper URL, they can enter any of the above formats. Here is the regex I am using right now, but that only checks if URL starts from proper protocol:</p>
  
  <pre><code>^(ftp|http|https):\/\/[^ "]+$
  </code></pre>