Re: Why this regexp matches?!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alban Hertroys <haramrae(at)gmail(dot)com>
Cc: depesz(at)depesz(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: Why this regexp matches?!
Date: 2012-02-14 05:09:36
Message-ID: 28185.1329196176@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alban Hertroys <haramrae(at)gmail(dot)com> writes:
> On 4 Feb 2012, at 9:46, hubert depesz lubaczewski wrote:
>> select 'depesz depeszx depesz' ~ E'^(.*)( \\1)+$';

> Apparently something odd is going on between the wildcard, the repetitive part and the back-reference. That could be just us not seeing what's wrong with the expression or be an actual bug.

FYI, I've made some progress on characterizing the cause of this bug,
as per comments at the upstream bug report:
https://sourceforge.net/tracker/index.php?func=detail&aid=1115587&group_id=10894&atid=110894
There are actually two distinct bugs involved, and I don't yet have a
patch for the case depesz illustrates.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marti Raudsepp 2012-02-14 11:26:47 Re: Database denormalization
Previous Message Steve Crawford 2012-02-13 23:01:24 Re: What is the life of a postgres back end process?