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


Groups > comp.lang.python > #74059

Re: Question about metacharacter '*'

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <fomcl@yahoo.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status UNSURE 0.296
X-Spam-Level **
X-Spam-Evidence '*H*': 0.49; '*S*': 0.08; 'subject:Question': 0.07; '>in': 0.16; 'subject:skip:m 10': 0.16; 'wrote:': 0.18; 'affects': 0.24; 'tend': 0.24; 'to:2**1': 0.27; 'to:no real name:2**1': 0.29; 'equivalent.': 0.31; 'johnson': 0.35; 'but': 0.35; 'charset:us- ascii': 0.36; 'two': 0.37; 'expressed': 0.37; 'to:addr:python- list': 0.38; 'aside': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'utilize': 0.61; 'received:gq1.yahoo.com': 0.68; 'received:mail.gq1.yahoo.com': 0.68; 'received:98.136': 0.69; 'article': 0.77; 'received:bullet.mail.gq1.yahoo.com': 0.84; 'technically': 0.84; 'rick': 0.93
X-Yahoo-Newman-Property ymail-3
X-Yahoo-Newman-Id 693235.23271.bm@omp1086.mail.gq1.yahoo.com
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1404668474; bh=K7AYM/FwbQoEbfSdsydOfr/Su22EKZ7xlsPgzghMTQI=; h=Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=cHwKOTgtfqie+kgCORe+FWd86AKqnyzZAgc2edP/mH2FIKVuamr/jv/gusnVhMOGkz02Gxvv4rS+Egzx9VsmjW8w1F6sz5gllxK7E03EiyFrmx0yTMcD7LxSf8ny0mRl9ozPr0H9sZwrgr3UrTxC04uJsk2xRkhfJdq6oc8bY58=
X-YMail-OSG tpQhzAEVM1lh3lA74C0sk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subject Re: Question about metacharacter '*'
To roy@panix.com, python-list@python.org
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Mailman-Approved-At Mon, 07 Jul 2014 00:41:00 +0200
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11561.1404686462.18130.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404686462 news.xs4all.nl 2831 [2001:888:2000:d::a6]:54723
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:74059

Show key headers only | View raw




>In article <d8f8d76d-0a47-4f59-8f09-da2a44cc1d2e@googlegroups.com>,
> Rick Johnson <rantingrickjohnson@gmail.com> wrote:
>
>> As an aside i prefer to only utilize a "character set" when
>> nothing else will suffice. And in this case r"[0-9][0-9]*"
>> can be expressed just as correctly  (and less noisy IMHO) as
>> r"\d\d*".
>
>Even better, r"\d+"

I tend tot do that too, even though technically the two are not perfectly equivalent. With the re.LOCALE flag LC_ctype is also affected, which affects what is captured by \d but not by [0-9]

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


Thread

Re: Question about metacharacter '*' Albert-Jan Roskam <fomcl@yahoo.com> - 2014-07-06 10:41 -0700

csiph-web