Regex pattern not working for input pattern match
<pre><code>&lt;input type="text" id="url" name="url"  pattern="/ ^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)(amazon)|(flipkart)+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$ /" required /&gt;
</code></pre>

<p>The displayed is my input. But I am unable to match any input. It should correctly match any website starting with <a href="http://flipkart.com" rel="nofollow">http://flipkart.com</a> or <a href="http://amazon.com" rel="nofollow">http://amazon.com</a>. I checked on rubular. The expression is correct. Where am I wrong . please help . Thank you./</p>