Regex for validate a website URL
<p>The following regex:</p>

<pre><code>(http|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&amp;amp;:\/~+#-]*[\w@?^=%&amp;amp;\/~+#-])?
</code></pre>

<p>Is matched for the following:</p>

<pre><code>https://something.com, 
https://www.something.com, 
http://something.com, 
http://www.something.com
</code></pre>

<p>But the following is should not be match which is matched for the current regex:</p>

<pre><code>https://www.something, http://www.something
</code></pre>

<p>And also the following is should be matched which is not matched for the current regex:</p>

<pre><code>something.com, www.something.com
</code></pre>

<p>And also it matched for any domain, what I want to do is only accept known domains (such as: .com, .net, .biz etc).</p>

<p>How can I improve the above regex?</p>