Re: regexp_replace

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "a_ogawa00" <a_ogawa00(at)yahoo(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org
Subject: Re: regexp_replace
Date: 2005-06-06 15:39:27
Message-ID: 1774.1118072367@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Tom Lane wrote:
>> Don't we have this functionality already? It's even SQL-spec ...

> Uh, all I see it replace(), which isn't regex:

The SQL-spec function is substring(string from pattern for escape-char);
see
http://www.postgresql.org/docs/8.0/static/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP

and we also have a variant of that for POSIX rather than SQL-style
regexps:
http://www.postgresql.org/docs/8.0/static/functions-matching.html#FUNCTIONS-POSIX-REGEXP

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2005-06-06 15:39:48 Re: ARRAY() returning NULL instead of ARRAY[] resp. {}
Previous Message Bruce Momjian 2005-06-06 15:34:47 Re: regexp_replace

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2005-06-06 15:39:48 Re: ARRAY() returning NULL instead of ARRAY[] resp. {}
Previous Message Bruce Momjian 2005-06-06 15:34:47 Re: regexp_replace