Re: Negative lookbehind assertions in regexs

From: "Julian Scarfe" <julian(at)avbrief(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Negative lookbehind assertions in regexs
Date: 2005-09-03 14:59:18
Message-ID: 09d701c5b098$10afee50$0600a8c0@Wilbur
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

From: "Bruno Wolff III" <bruno(at)wolff(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Herrera 2005-09-03 15:28:11 Re: Negative lookbehind assertions in regexs
Previous Message Oz 2005-09-02 21:27:07 Searching for results with an unknown amount of data