re Challenge: More Compact?

Tim Daneliuk tundra at tundraware.com
Sun Jul 15 21:00:02 CEST 2001


The following re is (I think) the description of a legitimate IP addess in
"quad" format (IPV4).  My question is, can it be made even shorter?

ipquad   = r"^((\d\d?\d?\.){3}(\d\d?\d?))$"
-- 
------------------------------------------------------------------------------
Tim Daneliuk
tundra at tundraware.com



More information about the Python-list mailing list