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 9CFE3D76FE for ; Mon, 29 Aug 2005 10:11:39 -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 67229-08 for ; Mon, 29 Aug 2005 13:11:36 +0000 (GMT) Received: from mta09-winn.ispmail.ntl.com (mta09-winn.ispmail.ntl.com [81.103.221.49]) by svr1.postgresql.org (Postfix) with ESMTP id 1A7DCD71DA for ; Mon, 29 Aug 2005 10:11:33 -0300 (ADT) Received: from aamta11-winn.ispmail.ntl.com ([81.103.221.35]) by mta09-winn.ispmail.ntl.com with ESMTP id <20050829131137.BIMZ9239.mta09-winn.ispmail.ntl.com@aamta11-winn.ispmail.ntl.com> for ; Mon, 29 Aug 2005 14:11:37 +0100 Received: from Wilbur ([81.96.74.213]) by aamta11-winn.ispmail.ntl.com with SMTP id <20050829131137.STMC13593.aamta11-winn.ispmail.ntl.com@Wilbur> for ; Mon, 29 Aug 2005 14:11:37 +0100 Message-ID: <008901c5ac9b$31bb8b50$0600a8c0@Wilbur> From: "Julian Scarfe" To: References: <001a01c5ac84$496fc750$1102a8c0@dream> Subject: Negative lookbehind assertions in regexs Date: Mon, 29 Aug 2005 14:11:37 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response 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.117 required=5 tests=[AWL=0.067, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/266 X-Sequence-Number: 22494 I'd like a regex that matches 'CD' but not 'ABCD' in any part of the regex. In Perl I'd use a negative lookbehind assertion (?