is this a known re 'bug/feature'?

Robin Becker robin at jessikat.fsnet.co.uk
Mon Jan 15 08:47:47 EST 2001


I find the following bug/feature/difference between the new and older re modules, is
this a known feature?  Seems like the new re doesn't like {m,n} modifiers.

>>> import re, pre
>>> P = re.compile('\\{(M{1,5}|YYYY|YY|D{1,4})\\}',re.MULTILINE|re.IGNORECASE)
>>> oP = pre.compile('\\{(M{1,5}|YYYY|YY|D{1,4})\\}',re.MULTILINE|re.IGNORECASE)
>>> P.match('{MMMMM}')
>>> oP.match('{MMMMM}')
<pre.MatchObject instance at 0113B754
>>>> 
-- 
Robin Becker



More information about the Python-list mailing list