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


Groups > comp.lang.python > #64788

Re: re Questions

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!newsfeed.datemas.de!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'warnings': 0.04; 'compiler': 0.07; 'subject:Questions': 0.07; 'suppose': 0.07; 'literal': 0.09; 'occasionally': 0.09; 'suggest': 0.14; 'wrote': 0.14; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'hex': 0.16; 'inclined': 0.16; 'minus': 0.16; 'roy': 0.16; 'set,': 0.16; 'skip:[ 60': 0.16; 'skip:^ 20': 0.16; 'variations': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'user.': 0.19; 'entered': 0.20; 'example': 0.22; "i've": 0.25; 'equivalent': 0.26; 'header:In- Reply-To:1': 0.27; 'character': 0.29; "i'm": 0.30; 'url:wiki': 0.31; 'url:wikipedia': 0.31; 'this.': 0.32; "i'd": 0.34; "can't": 0.35; 'but': 0.35; 'done': 0.36; 'url:org': 0.36; 'should': 0.36; 'error.': 0.37; 'filter': 0.38; 'somebody': 0.38; 'to:addr:python- list': 0.38; 'issue': 0.38; 'to:addr:python.org': 0.39; 'letters': 0.60; 'range': 0.61; "you're": 0.61; 'smith': 0.68; 'a-z,': 0.84; 'allowable': 0.84; 'distinguish': 0.84; 'legit.': 0.84; 'received:50.22': 0.84; 'touched,': 0.84; 'visually': 0.84; 'imagine': 0.93
Date Sun, 26 Jan 2014 13:41:41 -0600
From Tim Chase <python.list@tim.thechases.com>
To python-list@python.org
Subject Re: re Questions
In-Reply-To <roy-B66F25.12151426012014@news.panix.com>
References <3f568767-e13a-4c7d-a4fb-85caca2adf6e@googlegroups.com> <mailman.5996.1390756093.18130.python-list@python.org> <roy-B66F25.12151426012014@news.panix.com>
X-Mailer Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Authenticated-Sender tim@thechases.com
X-OutGoing-Spam-Status No, score=-6.0
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - boston.accountservergroup.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - tim.thechases.com
X-Get-Message-Sender-Via boston.accountservergroup.com: authenticated_id: tim@thechases.com
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.6000.1390765257.18130.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1390765257 news.xs4all.nl 2901 [2001:888:2000:d::a6]:33839
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:64788

Show key headers only | View raw


On 2014-01-26 12:15, Roy Smith wrote:
> > The set [A-z] is equivalent to
> > [ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz]  
> 
> I'm inclined to suggest the regex compiler should issue a warning
> for this.
> 
> I've never seen a character range other than A-Z, a-z, or 0-9.
> Well, I suppose A-F or a-f if you're trying to match hex digits
> (and some variations on that for octal).  But, I can't imagine any
> example where somebody wrote A-z and it wasn't an error.

I'd not object to warnings on that one literal "A-z" set, but I've
done some work with VINs¹ where the allowable character-set is A-Z and
digits, minus letters that can be hard to distinguish visually
(I/O/Q), so I've used ^[A-HJ-NPR-Z0-9]{17}$ as a first-pass filter
for VINs that were entered (often scanned, but occasionally
hand-keyed).  In some environments, I've been able to intercept I/O/Q
and remap them accordingly to 1/0/0 to do the disambiguation for the
user.  So I'd not want to see other character-classes touched, as
they can be perfectly legit.

-tkc

¹ http://en.wikipedia.org/wiki/Vehicle_Identification_Number



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


Thread

re Questions Blake Adams <blakesadams@gmail.com> - 2014-01-26 08:59 -0800
  Re: re Questions Larry Martell <larry.martell@gmail.com> - 2014-01-26 10:06 -0700
    Re: re Questions Blake Adams <blakesadams@gmail.com> - 2014-01-26 09:15 -0800
  Re: re Questions Chris Angelico <rosuav@gmail.com> - 2014-01-27 04:08 +1100
    Re: re Questions Roy Smith <roy@panix.com> - 2014-01-26 12:15 -0500
      Re: re Questions Chris Angelico <rosuav@gmail.com> - 2014-01-27 04:25 +1100
      Re: re Questions Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-26 17:39 +0000
      Re: re Questions Tim Chase <python.list@tim.thechases.com> - 2014-01-26 13:41 -0600
    Re: re Questions Blake Adams <blakesadams@gmail.com> - 2014-01-26 09:15 -0800
      Re: re Questions Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-26 17:30 +0000

csiph-web