/
# Match ipv4 IP addresses
# Specifically capture private IPs before matching the more global
# 0.0.0.0 - 255.255.255.255 octet ranges.
^(?P<private_10_ip>
10\.
(?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\.
(?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\.
(?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])
)$
|
^(?P<private_169_ip>
169\.
254\.
(?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\.
(?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])
)$
|