X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 797F4D86B8 for ; Sat, 3 Sep 2005 11:59:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79890-07 for ; Sat, 3 Sep 2005 14:59:25 +0000 (GMT) Received: from mta07-winn.ispmail.ntl.com (mta07-winn.ispmail.ntl.com [81.103.221.47]) by svr1.postgresql.org (Postfix) with ESMTP id 1D0C9D77A4 for ; Sat, 3 Sep 2005 11:59:22 -0300 (ADT) Received: from aamta10-winn.ispmail.ntl.com ([81.103.221.35]) by mta07-winn.ispmail.ntl.com with ESMTP id <20050903145920.EVHM21883.mta07-winn.ispmail.ntl.com@aamta10-winn.ispmail.ntl.com> for ; Sat, 3 Sep 2005 15:59:20 +0100 Received: from Wilbur ([81.96.74.213]) by aamta10-winn.ispmail.ntl.com with SMTP id <20050903145920.YAFT3432.aamta10-winn.ispmail.ntl.com@Wilbur> for ; Sat, 3 Sep 2005 15:59:20 +0100 Message-ID: <09d701c5b098$10afee50$0600a8c0@Wilbur> From: "Julian Scarfe" To: References: <001a01c5ac84$496fc750$1102a8c0@dream> <008901c5ac9b$31bb8b50$0600a8c0@Wilbur> <20050829162103.GA32443@wolff.to> Subject: Re: Negative lookbehind assertions in regexs Date: Sat, 3 Sep 2005 15:59:18 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.112 required=5 tests=[AWL=0.062, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200509/22 X-Sequence-Number: 22569 >> I'd like a regex that matches 'CD' but not 'ABCD' in any part of the >> regex. From: "Bruno Wolff III" > Something like: > (^.?CD)|([^B]CD)|([^A]BCD) Thanks to Bruno, and to Dawid who replied offline. The above does the job nicely. Any plans for a Perl Compatible Regular Expression operator? http://www.pcre.org/ Or are two regex operators enough? Julian