[issue19964] '?' is always non-greedy

Sworddragon report at bugs.python.org
Thu Dec 12 18:07:47 CET 2013


New submission from Sworddragon:

>From the documentation: "The '*', '+', and '?' qualifiers are all greedy;"

But this is not the case for '?'. In the attachments is an example which shows this: re.search(r'1?', '01') should find '1' but it doesn't find anything.

----------
components: Library (Lib)
files: test.py
messages: 205962
nosy: Sworddragon
priority: normal
severity: normal
status: open
title: '?' is always non-greedy
type: behavior
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file33104/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19964>
_______________________________________


More information about the Python-bugs-list mailing list