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
This works for python 2.7:
import re a=raw_input("Enter a valid IP_Address:") b=("[0-9]+"+".")+"{3}" if re.match(b,a) and b<255: print "Valid" else: print "invalid"