Need to match:
Subnet | Regex |
---|---|
10.0.0.0/8 | ^10(\.(0|1[0-9]{0,2}|5[0-5]|[1-9]{2}|[0-4][0-9])){3}$ |
127.0.0.0/8 | ^127(\.(0|1[0-9]{0,2}|25[0-5]|[1-9]{2}|2[0-4][0-9])){3}$ |
172.16.0.0/12 | ^172\.((?P<f>1)?(?(f)[6-9])|(?P<s>2)?(?(s)[0-9])|(?P<t>3)?(?(t)[0-1]))(\.[0-2]([0-5]){0,2}){2}$ |
192.168.0.0/16 | ^192\.168(\.(0|1[0-9]{0,2}|25[0-5]|[1-9]{2}|2[0-4][0-9])){2}$ |