I\'m trying to make a test for checking whether a sys.argv input matches the RegEx for an IP address...
As a simple test, I have the following...
imp
""" regex for finding valid ip address """
import re IPV4 = re.fullmatch('([0-2][0-5]{2}|\d{2}|\d).([0-2][0-5]{2}|\d{2}|\d).([0-2][0-5]{2}|\d{2}|\d).([0-2][0-5]{2}|\d{2}|\d)', '100.1.1.2') if IPV4: print ("Valid IP address") else: print("Invalid IP address")