>>> type = re.search('\d+',a).group() or 'page' Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: 'NoneType' object has no attribute 'group'
> If the search does not succeed, the returned object has the value > None, which has no attribute group. Ah yes! I forgot about the call to group(). I was just thinking if we got a None match. Ironic since it was me tagged the group call on in the first place! try/except it needs to be then... Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor