I believe IP can only range from 0.0.0.0 to 255.255.255.255. I see lot's of complicated regex answers to match and validate IP addresses on stack overflow. Tell me what's wrong with mine.
ip = re.compile(r'[0-2]*[0-5]*[0-5]*\.[0-2]*[0-5]*[0-5]*\.[0-2]*[0-5]*[0-5]*\.[0-2]*[0-5]*[0-5]*\')
It works.