My first Python program AND IT DOESN'T WORK. Would someone please explain why?

Andrew Bennetts andrew-pythonlist at puzzling.org
Tue Feb 18 03:55:51 EST 2003


On Tue, Feb 18, 2003 at 12:36:57AM -0800, Sean 'Shaleh' Perry wrote:
> 
> d = re.sub(r'\nRe:.*[A|P]M \n', '\n', d) # match [A|P]M for safety

For the AM/PM bit, you either want [AP]M or (A|P)M.  You seem to have mixed
the two together :)

-Andrew.






More information about the Python-list mailing list