pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julian Scarfe <julian@avbrief.com>
To: pgsql-sql@postgresql.org
Subject: Re: Negative lookbehind assertions in regexs
Date: Sat, 3 Sep 2005 15:59:18 +0100
Message-ID: <09d701c5b098$10afee50$0600a8c0@Wilbur> (raw)
References: <001a01c5ac84$496fc750$1102a8c0@dream>
	<008901c5ac9b$31bb8b50$0600a8c0@Wilbur>
	<20050829162103.GA32443@wolff.to>

>> I'd like a regex that matches 'CD' but not 'ABCD' in any part of the 
>> regex.

From: "Bruno Wolff III" <bruno@wolff.to>

> 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






view thread (5+ messages)  latest in thread

Message-ID: <09d701c5b098$10afee50$0600a8c0@Wilbur>
Permalink:  ../09d701c5b098$10afee50$0600a8c0@Wilbur/
Also on:    postgresql.org/message-id/09d701c5b098$10afee50$0600a8c0@Wilbur

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: julian@avbrief.com
  Subject: Re: Negative lookbehind assertions in regexs
  In-Reply-To: <09d701c5b098$10afee50$0600a8c0@Wilbur>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox