[pypy-issue] [issue923] Regular expressions with optional look-ahead operations failing to match

Bruno Gola tracker at bugs.pypy.org
Thu Oct 27 06:54:21 CEST 2011


New submission from Bruno Gola <brunogola at gmail.com>:

I'm trying to run moin-2.0 on PyPy and I found this weird behavior that I think 
is a bug.

Whenever you have a regexp that uses the look-ahead operator [ (?=) ] followed 
by the optional operator [ ? ], the regex fails.

For example:

CPython 2.7:
>>> re.compile('asdf(?=(1))?').match('asdf1a').groups()
('1',)

PyPy 1.6:
>>>> re.compile('asdf(?=(1))?').match('asdf1a').groups()
(None,)

I believe this affects the PyPy development version as well as there were almost 
no changes to the RE stuff in PyPy.

----------
messages: 3385
nosy: bgola, pypy-issue
priority: bug
release: 1.7
status: unread
title: Regular expressions with optional look-ahead operations failing to match

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue923>
________________________________________


More information about the pypy-issue mailing list