With an IPv4 address range like 169.254.0.0/16 or 192.168.0.0/16, it is straightforward to construct a regex for each, since once you exactly match the first 6 digits, you're done.
But what about matching any address in a looser reserved range such as
100.64.0.0 –
100.127.255.255
A regex beginning with 100\.
won't suffice, because there will be numbers outside of the 100.64 and 100.127 bounds (e.g. 100.65.0.0, 100.127.255.256) that will be erroneously matched. How best to capture a range such as this without having to explicitly define each and every valid subrange within each range? The language is Python.
For reference, a full list of reserved IP addresses and ranges can be found here.