Re: Why this regexp matches?!

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Why this regexp matches?!
Date: 2012-02-06 11:29:23
Message-ID: jgodij$lp1$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2012-02-04, hubert depesz lubaczewski <depesz(at)depesz(dot)com> wrote:
> select 'depesz depeszx depesz' ~ E'^(.*)( \\1)+$';
>
> what's worse:
> $ select regexp_replace( 'depesz depeszx depesz', E'^(.*)( \\1)+$', E'\\1' );
> regexp_replace
> ────────────────
> depesz
> (1 row)
>
> I know that Pg regexps are limited, but even grep's regexps match this
> correctly:

whose grep?

Postgres is BSD licence and that means they can't use the latest and
greatest GPL libraries.

--
⚂⚃ 100% natural

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2012-02-06 11:48:53 Re: Why this regexp matches?!
Previous Message Alban Hertroys 2012-02-06 11:23:45 Re: Error while importing CSV file