[Python-bugs-list] [Bug #128899] SRE fails to match when using {m,n} syntax

noreply@sourceforge.net noreply@sourceforge.net
Mon, 15 Jan 2001 10:03:30 -0800


Bug #128899, was updated on 2001-Jan-15 10:03
Here is a current snapshot of the bug.

Project: Python
Category: Regular Expressions
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: effbot
Assigned to : nobody
Summary: SRE fails to match when using {m,n} syntax

Details: from comp.lang.python:

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

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=128899&group_id=5470