Private(Local) IP Address Identifier in Regular Expression
# https://stackoverflow.com/questions/2814002/private-ip-address-identifier-in-regular-expression
import re
pat = re.compile(
r'^127\.' r'|'
r'^10\.' r'|'
r'^172\.1[6-9]\.' r'|'
r'^172\.2[0-9]\.' r'|'
r'^172\.3[0-1]\.' r'|'
r'^192\.168\.')
[bool(pat.match(ip)) for ip in ['172.16.13.9', '127.0.0.1', '10.234.99.9', '192.168.0.1', '233.233.1.2', '12.7.0.1']]