Re: regexp_replace

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Andy Colson <andy(at)squeakycode(dot)net>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: regexp_replace
Date: 2016-01-14 20:39:46
Message-ID: CAKFQuwYBbLeOLmdA=AMjkBM02NdDzCwFyPijPys1bvayhSObxA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 14, 2016 at 1:27 PM, Andy Colson <andy(at)squeakycode(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Williamson, Michael 2016-01-14 21:47:22 Re: v9.1, DROP TRIGGER IF EXISTS behaving oddly
Previous Message Andy Colson 2016-01-14 20:27:14 Re: regexp_replace