title: IP Address Regex allowing for port
body: <p>I have the following regex to match an IP address:</p>
  
  <pre><code>(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
  </code></pre>
  
  <p>Could someone please update it to allow for a port number on the end (port number would be optional)</p>
  
  <p>Thanks in advance</p>