title: using Regular exprestion to validate IP Address in Powershell?
body: <p>I have this code in PowerShell and it does not work! any help?</p>
  
  <p>I just need it to make sure that the string is a working IP not 999.999.999.999 or a normal string</p>
  
  <p>just an IP [0....255].[0....255].[0....255].[0....255]</p>
  
  <pre><code>if ($newIP -match "(\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)") { $x = $True}
  </code></pre>
  
  <p>cheers</p>