Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.061 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'subject:module': 0.04; 'python': 0.08; 'am,': 0.12; 'subject: \n ': 0.16; 'url:hg': 0.16; 'weird.': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'repeated': 0.18; 'subject:skip:s 10': 0.18; 'cc:no real name:2**0': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'assume': 0.22; 'feb': 0.22; 'suite,': 0.23; 'subject: ?': 0.24; 'cc:2**0': 0.26; 'work.': 0.27; 'message-id:@mail.gmail.com': 0.29; 'cc:addr:python.org': 0.29; 'actual': 0.32; 'tue,': 0.32; 'there': 0.33; 'this.': 0.33; 'test': 0.34; 'crazy': 0.34; 'however,': 0.35; 'something': 0.35; 'url:python': 0.35; 'received:209.85.160': 0.36; 'but': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'some': 0.38; 'becomes': 0.39; 'received:209.85.160.46': 0.39; 'received:mail- pw0-f46.google.com': 0.39; 'url:org': 0.39; 'received:209': 0.39; 'works,': 0.68; 'soon': 0.72; '(see:': 0.84; 'anchor': 0.84; 'subject:Nothing': 0.84; 'subject:nothing': 0.84; 'url:lib': 0.84; 'url:test': 0.91; 'realistic': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=E0cTy90jvK/5tphwLc1/VmqBU7L5ygQ1+jZ3UZO9k6o=; b=Pk7lZR+SdlZggzYWR2ysHTdPgunDznNT69/B7GT0Os2aVKCKkn6A+GsM1UXgdkWo+3 SLiLc+m3VZTvWVWMKpxy0uGOIjGMiDbukSHuYu5tFvb9C1trqSsFWUeDMLe8AHvD1wWd fMXlHMwxBJCBhh/NM0xAz2UHsrUpKppmiXSF0= MIME-Version: 1.0 In-Reply-To: References: From: Devin Jeanpierre Date: Tue, 14 Feb 2012 10:53:38 -0500 Subject: Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ? To: Vlastimil Brom Content-Type: text/plain; charset=UTF-8 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1329234861 news.xs4all.nl 6957 [2001:888:2000:d::a6]:53573 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20404 On Tue, Feb 14, 2012 at 10:05 AM, Vlastimil Brom 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