pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: pgsql-general@postgresql.org
Subject: Re: Mixing greediness in regexp_matches
Date: Mon, 23 Dec 2019 11:16:58 -0500
Message-ID: <9597.1577117818@sss.pgh.pa.us> (raw)
In-Reply-To: <90347d36-4b3c-4806-bd99-e5fae2cfad71@manitou-mail.org>
References: <90347d36-4b3c-4806-bd99-e5fae2cfad71@manitou-mail.org>

"Daniel Verite" <daniel@manitou-mail.org> writes:
> FWIW, in plperl, there's a simple solution:
>  $string =~ s/(foobar|foo|...)/$replace{$1}/g

Well, our manual does suggest using plperl (or pltcl) when the
built-in pattern match functions aren't adequate ;-)

			regards, tom lane





view thread (6+ messages)

Message-ID: <9597.1577117818@sss.pgh.pa.us>
Permalink:  ../9597.1577117818@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9597.1577117818@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@manitou-mail.org
  Subject: Re: Mixing greediness in regexp_matches
  In-Reply-To: <9597.1577117818@sss.pgh.pa.us>
  References: <90347d36-4b3c-4806-bd99-e5fae2cfad71@manitou-mail.org> <9597.1577117818@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox