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: 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: References: Date: Wed, 3 Jul 2013 20:50:51 -0600 Subject: Re: Regular expression negative look-ahead From: Jason Friedman Cc: Python 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 --047d7b10ca556c856604e0a6a5ed Content-Type: text/plain; charset=UTF-8 > 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. --047d7b10ca556c856604e0a6a5ed Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

=
Huh, did not realize that e= ndswith takes a list. =C2=A0I'll remember that in the future.

This need is actually for=C2=A0http://schemaspy.sourceforge.net/, w= hich allows one to include only tables/views that match a pattern.

Either there is a bug in Schemaspy's code or Java&#= 39;s implementation of regular expressions is different than Python's o= r there is a flaw in my logic, because the pattern I verify using Python pr= oduces different results when used with Schemaspy. =C2=A0I suppose I'll= open a bug there unless I can find the aforementioned flaw.

if not table_name.endswith(('_CTL', '_DEL', '_RUN')= ):
=C2=A0 =C2=A0 # Do whatever


Shoot, sorry, did not mean to top-post.
--047d7b10ca556c856604e0a6a5ed--