title: Regular express to validate url with ip and domain?
body: <p>i am using following regular expression to validate a url that could be:</p>
  
  <pre><code>@"http[s]?://([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&amp;=]*)?";
  </code></pre>
  
  <p><strong>A domin</strong>
  www.abc.com  (Validates it)
  subdomain.abc.com  (Validates it)</p>
  
  <p><strong>An Ip Address</strong>
  192.168.0.1  (Validates it)
  182.494.29.23  (Validates it)</p>
  
  <p>I want to restrict non valid ip addresses
  192.192   (Above Expression Validates it as well)
  192.192.192 (Above Expression Validates it as well)</p>
  
  <p>any one guide me what changes i need to add in above expression to restrict these non valid ip addresses?</p>
  
  <p>Thanks in advance.</p>