On Sun, Aug 10, 2008 at 1:58 AM, Josh Rosen <[EMAIL PROTECTED]> wrote:
>> Since it doesn't look like you're doing anything with the parts of the ip
>> besides writing the whole ip to a file, you can eliminate the capturing
>> parentheses in your regular expression and replace them with a single pair:
>>
>>        patt = re.compile(r"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})")

There is no need for the outer parentheses either.

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to