in reply to Regexp question,get 2nd match
Maybe consider matching the first IP address and then something and then the second IP address? It shouldn't be hard to modify your regular expression to allow for that.