Improve regex matching IPs