Re: Negative lookbehind assertions in regexs - Mailing list pgsql-sql

From Julian Scarfe
Subject Re: Negative lookbehind assertions in regexs
Date
Msg-id 09d701c5b098$10afee50$0600a8c0@Wilbur
Whole thread Raw
In response to PostgreSQL help  ("Shavonne Marietta Wijesinghe" <shavonne.marietta@studioform.it>)
Responses Re: Negative lookbehind assertions in regexs
Re: Negative lookbehind assertions in regexs
List pgsql-sql
>> 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





pgsql-sql by date:

Previous
From: "Oz"
Date:
Subject: Searching for results with an unknown amount of data
Next
From: Alvaro Herrera
Date:
Subject: Re: Negative lookbehind assertions in regexs