Re: BUG #4044: Incorrect RegExp substring Output

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rui Martins" <Rui(dot)Martins(at)PDMFC(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4044: Incorrect RegExp substring Output
Date: 2008-03-20 15:30:32
Message-ID: 10502.1206027032@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Rui Martins" <Rui(dot)Martins(at)PDMFC(dot)com> writes:
> But the sub-expression did "match" !

No, the sub-expression "(something)" did not match. What did match
is the larger expression "(something)?". You seem to be failing
to recognize that these are two different things. If you put the
capturing parentheses around the larger expression then you will
get the result you want.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Eugen Konkov 2008-03-21 14:44:52 BUG #4047: case preserve for columns
Previous Message Rui Martins 2008-03-20 15:21:49 Re: BUG #4044: Incorrect RegExp substring Output