strings: Better matching of IPs

This commit fixes a bug, where strings wouldn't correctly match IPs.