Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'skip:[ 20': 0.03; 'suppose': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'underscore': 0.09; '10:00': 0.16; 'ah,': 0.16; 're,': 0.16; 'received:80.91.229.3': 0.16; 'received:dip.t-dialin.net': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-dialin.net': 0.16; 'reedy': 0.16; 'subject:Regular': 0.16; 'subject:expression': 0.16; 'underscores': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'allows': 0.25; 'least': 0.25; 'header:User-Agent:1': 0.26; 'skip:[ 10': 0.26; 'am,': 0.27; 'header:X-Complaints-To:1': 0.28; '>>>>': 0.29; 'yes.': 0.29; 'no,': 0.29; 'url:python': 0.32; 'to:addr:python- list': 0.33; 'there': 0.35; 'received:org': 0.36; 'url:org': 0.36; 'characters': 0.36; 'url:library': 0.36; 'should': 0.36; 'two': 0.37; 'subject:: ': 0.38; 'url:docs': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'end': 0.40; 'leading': 0.61; 'subject:, ': 0.61; 'maximum': 0.63; 'subject:...': 0.63; 'here': 0.65; 'etc,': 0.84; 'otten': 0.84; 'subject:very': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Regular expression syntax, was Re: pylint, was Re: pygame - importing GL - very bad... Date: Thu, 03 Jan 2013 12:39:12 +0100 Organization: None References: <50e4c83b$0$30003$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: p5084be63.dip.t-dialin.net User-Agent: KNode/4.7.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357213140 news.xs4all.nl 6871 [2001:888:2000:d::a6]:39550 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36053 someone wrote: > On 01/03/2013 10:00 AM, Peter Otten wrote: >> Terry Reedy wrote: >> >>>> [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with >>>> [an >>>> underscore ? >>> >>> No, it allows underscores. As I read that re, 'rx', etc, do match. They >> >> No, it's one leading letter or underscore [a-z_] plus at least two >> letters, underscores or digits [a-z0-9_]{2,30} > > Ah, [a-z0-9_]{2,30} means there should be at least two characters and > maximum 30 characters here ? Yes. See http://docs.python.org/2/library/re.html#regular-expression-syntax