RFC1918 defines private IPv4 addresses as those that fall within any of the following ranges:
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255
I'm adding 127.0.0.1 to this list, for the purposes of my analysis. I know there are tried-and tested regex's to match any IPv4 address, but how would I narrow one of these to down to matching only if the address falls in one of the above ranges or in 127.0.0.1? Will be using Python.
Many thanks