Re: regexp_replace - Mailing list pgsql-general

From David G. Johnston
Subject Re: regexp_replace
Date
Msg-id CAKFQuwYBbLeOLmdA=AMjkBM02NdDzCwFyPijPys1bvayhSObxA@mail.gmail.com
Whole thread Raw
In response to Re: regexp_replace  (Andy Colson <andy@squeakycode.net>)
List pgsql-general
On Thu, Jan 14, 2016 at 1:27 PM, Andy Colson <andy@squeakycode.net> wrote:
On 1/14/2016 2:06 PM, David G. Johnston wrote:
select regexp_replace('71.09.6.01.3', '(\d)[.-](?=\d)', '\1\2', 'g');


​John already picked up on the fact that the "\2" in the replacement is pointless (neither helping nor hurting) since nothing was captured at that position.

David J.


pgsql-general by date:

Previous
From: Andy Colson
Date:
Subject: Re: regexp_replace
Next
From: "Williamson, Michael"
Date:
Subject: Re: v9.1, DROP TRIGGER IF EXISTS behaving oddly