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


Groups > comp.lang.python > #49797

Re: Regular expression negative look-ahead

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin1!goblin.stu.neva.ru!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <jsf80238@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'url:sourceforge': 0.03; 'expressions': 0.07; 'suppose': 0.07; 'cc:addr:python-list': 0.11; 'python': 0.11; 'bug': 0.12; 'subject:Regular': 0.16; 'subject:expression': 0.16; '\xc2\xa0i': 0.16; "python's": 0.19; 'cc:addr:python.org': 0.22; 'sorry,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'produces': 0.31; 'allows': 0.31; 'regular': 0.32; 'open': 0.33; 'received:google.com': 0.35; 'there': 0.35; "i'll": 0.36; 'list.': 0.37; 'whatever': 0.38; 'realize': 0.39; 'either': 0.39; 'different': 0.65; 'results': 0.69; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=yj/DohARddA6xmBBcwjxXntjzk/1ZkgxKXkeRGodG0g=; b=G6ayoxcff4jfRDgXh2CmXe+uPWBcADgFStk1Ol6E20MdF3WSVAglXQH5bum8ssEKqt 1cahVZnhJcaU9WtEl80uZCZL85hJX2AMSngFiHMiwBLJrQXbfroeCQVSkUYW3PN90RTv vLQb04dDhCzvUZL86NhKL6Ds3NimdX/4YgiT46xyRLNaPHijBlrq1xTo5zjWZQBYtoCM KCbofS6HlXn0auQaxistGo7Yq5enyIB94C4plpHv37DtFQMmv5MJ3pg5QnZMKs9LoODz UygSeJehq42ZExDmmsHUpx6zvY3wzwJcrIfiweGXqq3i8RTbNyykcRF+14WeGa5uuXUh tD2g==
MIME-Version 1.0
X-Received by 10.50.32.70 with SMTP id g6mr26587309igi.2.1372906251374; Wed, 03 Jul 2013 19:50:51 -0700 (PDT)
In-Reply-To <CANy1k1iigQ5HPL+KWeArktu0Fg36k7fe6WaCZDvFhq0OkmJdUQ@mail.gmail.com>
References <CANy1k1iGTYjAVzTnNegXuW9FaoqZsXe1z8TMhzAN1VYeyDUnSQ@mail.gmail.com> <CANy1k1jGBgLj45ngn6qNd8Okx_tGnXdWQo0+4yTsNr=XdxUSXg@mail.gmail.com> <CALwzidnpEdA3wdXYbOjQrK_VOUDvEwCVbfPyHKBMich9w7bs8g@mail.gmail.com> <CANy1k1iigQ5HPL+KWeArktu0Fg36k7fe6WaCZDvFhq0OkmJdUQ@mail.gmail.com>
Date Wed, 3 Jul 2013 20:50:51 -0600
Subject Re: Regular expression negative look-ahead
From Jason Friedman <jsf80238@gmail.com>
Cc Python <python-list@python.org>
Content-Type multipart/alternative; boundary=047d7b10ca556c856604e0a6a5ed
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4198.1372906253.3114.python-list@python.org> (permalink)
Lines 50
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1372906253 news.xs4all.nl 15863 [2001:888:2000:d::a6]:45926
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:49797

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

> Huh, did not realize that endswith takes a list.  I'll remember that in
> the future.
>
> This need is actually for http://schemaspy.sourceforge.net/, which allows
> one to include only tables/views that match a pattern.
>
> Either there is a bug in Schemaspy's code or Java's implementation of
> regular expressions is different than Python's or there is a flaw in my
> logic, because the pattern I verify using Python produces different results
> when used with Schemaspy.  I suppose I'll open a bug there unless I can
> find the aforementioned flaw.
>
>
> if not table_name.endswith(('_CTL', '_DEL', '_RUN')):
>>     # Do whatever
>>
>>
> Shoot, sorry, did not mean to top-post.

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


Thread

Re: Regular expression negative look-ahead Jason Friedman <jsf80238@gmail.com> - 2013-07-03 20:50 -0600

csiph-web