Strip IP address from IP address / domain name pair for better wildcards

Fixes #2014