Re: [Tutor] re Formating

2009-02-25 Thread Kent Johnson
On Wed, Feb 25, 2009 at 7:46 AM, prasad rao wrote: > hi 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 "", line 3, in >     print m.group(1, 3)

[Tutor] re Formating

2009-02-25 Thread prasad rao
hi >>> 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 "", line 3, in print m.group(1, 3) IndexError: no such group Something wrong with this code. _