Johhny wrote:
> Hello,
>
> I have recently written a small function that will verify that an IP
> address is valid.
>
> ==SNIP==
>
> import re
> ipAddress = raw_input('IP Address : ')
>
> def validateIP(ipAddress):
> ipRegex =
> r"^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5
Johhny wrote:
> Hello,
>
> I have recently written a small function that will verify that an IP
> address is valid.
(snip re.match() based solution - just one remark: compiling the regexp
on each function call is more than useless)
> I was having issues trying to get my code working so that I c
"Johhny" wrote:
> I was having issues trying to get my code working so that I could pass
> the IP addresses and it would return a true or false. When it matches I
> get something that looks like this.
>
> python ip_valid.py
> IP Address : 192.158.1.1
> <_sre.SRE_Match object at 0xb7de8c80>
>
> As
Hello,
I have recently written a small function that will verify that an IP
address is valid.
==SNIP==
import re
ipAddress = raw_input('IP Address : ')
def validateIP(ipAddress):
ipRegex =
r"^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([