Re: [Tutor] using re groups

2009-03-06 Thread Kent Johnson
On Fri, Mar 6, 2009 at 7:56 AM, ski wrote: > Hello, > I have this: > import re s = "Association of British Travel Agents (ABTA) No. 56542\nAir Travel Organisation Licence (ATOL)\nAppointed Agents of IATA (IATA)\nIncentive Travel & Meet. Association (ITMA)" licenses = re.sp

[Tutor] using re groups

2009-03-06 Thread ski
Hello, I have this: >>> import re >>> s = "Association of British Travel Agents (ABTA) No. 56542\nAir Travel Organisation Licence (ATOL)\nAppointed Agents of IATA (IATA)\nIncentive Travel & Meet. Association (ITMA)" >>> licenses = re.split("\n+", s) >>> licenseRe = re.compile(r'\(([A-Z]+)\)( N