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


Groups > comp.lang.python > #74061 > unrolled thread

Re: Question about metacharacter '*'

Started byMRAB <python@mrabarnett.plus.com>
First post2014-07-06 23:49 +0100
Last post2014-07-06 23:49 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Question about metacharacter '*' MRAB <python@mrabarnett.plus.com> - 2014-07-06 23:49 +0100

#74061 — Re: Question about metacharacter '*'

FromMRAB <python@mrabarnett.plus.com>
Date2014-07-06 23:49 +0100
SubjectRe: Question about metacharacter '*'
Message-ID<mailman.11563.1404686967.18130.python-list@python.org>
On 2014-07-06 18:41, Albert-Jan Roskam wrote:
>
>
>
>>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]
>
\d also matches more than just [0-9] in Unicode.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web