New submission from Stefan Sonnenberg-Carstens <stefan.sonnenb...@pythonmeister.com>:
>>> import re >>> p = re.compile(r'(P?<quotedstring>("[^"]*"))') >>> p.match('"Hallo"') >>> p = re.compile(r'("[^"]*")') >>> p.match('"Hallo"') <_sre.SRE_Match object at 0x0197F758> >>> p.match('"Hallo"').group() '"Hallo"' >>> import sys >>> sys.version '2.6.3 (r263:75183, Oct 5 2009, 14:41:55) [MSC v.1500 32 bit (Intel)]' When I use a named group like above, the regex does not match. It otherwise does. I could not find a hint in the docs, so I guess this behaviour is not intended. ---------- components: Interpreter Core, Library (Lib) messages: 95152 nosy: pythonmeister severity: normal status: open title: Named group regex error type: behavior versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7308> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com