Re: Regular Expression in SQL - Mailing list pgsql-sql

From Tom Lane
Subject Re: Regular Expression in SQL
Date
Msg-id 25326.1153016552@sss.pgh.pa.us
Whole thread Raw
In response to Regular Expression in SQL  ("Aaron Bono" <postgresql@aranya.com>)
List pgsql-sql
"Aaron Bono" <postgresql@aranya.com> writes:
> I thought by using the FOR '#' I could specify exactly what part of the
> expression I would get but it still grabs the first (...) of the pattern.

Hmm ... I think that this is a bug in similar_escape(): it ought to
transform parentheses in a SIMILAR pattern into non-capturing parentheses.

Until this is fixed, your best bet is to use the POSIX-regexp form of
substring().  You can't sneak non-capturing parens through
similar_escape, because it'll try to escape the ? ...
        regards, tom lane


pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: Querying for name/value pairs in reverse
Next
From: "Nate Teller"
Date:
Subject: Re: How to find entries missing in 2nd table?