Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20404

Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?

References <CABicbJLzLM9As_Ji3EV3kZoV_5_OS129jnFdzZtbgBQTiNBDQA@mail.gmail.com> <CAHzaPEMbxr9K9i_qUouAmrk3VVm0_W23tL_z+9RxO1SQiLOxJA@mail.gmail.com>
From Devin Jeanpierre <jeanpierreda@gmail.com>
Date 2012-02-14 10:53 -0500
Subject Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?
Newsgroups comp.lang.python
Message-ID <mailman.5803.1329234861.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Feb 14, 2012 at 10:05 AM, Vlastimil Brom
<vlastimil.brom@gmail.com> wrote:
> However, is there any realistic usecase for repeated zero-width anchors?

Maybe. There is a repeated zero-width anchor is used in the Python re
test suite, which is what made me notice this. I assume that came from
some actual use-case. (see:
http://hg.python.org/cpython/file/096e856a01aa/Lib/test/test_re.py#l599
)

And yeah, even something as crazy as ()* works, but as soon as it
becomes (a*)* it doesn't work. Weird.

-- Devin

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ? Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-02-14 10:53 -0500

csiph-web