[Tutor] re Formating

prasad rao prasadaraon50 at gmail.com
Wed Feb 25 13:46:17 CET 2009

>>> licenseRe = re.compile(r'\(([A-Z]+)\)\s*(No.\d+)?')
>>> for license in licenses:
      m = licenseRe.search(license)
      print m.group(1, 3)

Traceback (most recent call last):
  File "<pyshell#17>", line 3, in <module>
    print m.group(1, 3)
IndexError: no such group

Something wrong with this code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090225/719c7adc/attachment.htm>

More information about the Tutor mailing list