Describe the bug

The class IpAddressMatcher allows hostnames due to incorrect validation of IPv4 addresses. This happens because the regular expression used to validate IPv4 does not escape dots properly.

To Reproduce

new IpAddressMatcher("10x1x1x1");  // looking up '10x1x1x1'

var matcher = new IpAddressMatcher("10.33.1.0/24");
matcher.matches("www"); // looking up 'www'

Expected behavior

It is expected that IpAddressMatcher should only process literal IP addresses (v4 or v6) or subnet mask.

Sample

Here is a small repo reproducing the problem.

Comment From: therepanic

Hi, @levry!. I think this change makes sense, so I decided to make the regex more strictly, i.e., to solve the problem you described. PTAL