title: Regex match any IP not in internal range
body: <p>I am currently writing an excel macro and I am having some real troubles with my specific requirement. </p>
  
  <p>I need to loop through cells and find any ip addresses which are not in the private ranges, </p>
  
  <pre><code>10.0.0.0 – 10.255.255.255
  172.16.0.0 – 172.31.255.255
  192.168.0.0 – 192.168.255.255
  </code></pre>
  
  <p>The code i am using: </p>
  
  <pre><code>Dim RE As Object
  Set RE = CreateObject("vbscript.regexp")
  
  With RE
      .MultiLine = False
      .Global = False
      .IgnoreCase = True
      .Pattern = ??
  End With
  </code></pre>
  
  <p>Not having any issues with the VBA code, just with the pattern. </p>
  
  <p>Would really love a regexp guru to help! </p>
  
  <p>Cell is formatted like this for example:</p>
  
  <pre><code>192.168.1.1 (subnet name), 203.134.56.7 (third party unknown), 10.0.0.0/8 (voice subnet), 10.1.1.5 (voice server), 56.8.0.0/16 (google)
  </code></pre>
  
  <p>As for the comment below, that is why I am looking for a regex solution if there is one as it means i can just run it over a cell and it should still find a third party IP as apposed to splitting into an array, and running each ip through a function. </p>