Skip site navigation (1) Skip section navigation (2)

BUG #6057: regexp_replace & back references

From: "Marc Mamin" <marc(at)intershop(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6057: regexp_replace & back references
Date: 2011-06-14 16:31:34
Message-ID: 201106141631.p5EGVYnk056729@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      6057
Logged by:          Marc Mamin
Email address:      marc(at)intershop(dot)de
PostgreSQL version: 9.0.4
Operating system:   Windows
Description:        regexp_replace & back references
Details: 

select regexp_replace ('a','(a)','\\1'||substring('\\1',1,1)||'\\1','g')
= a\1
I'd expect  a\1a as result.

More generally, I miss the avaibility to use back references as function
parameters. It is only possible with some operators (e.g. '\\1'||'\\1'),
probably depending on their lexical precedence. Any way to workaround this
limitation would be very helpful.

HTH,

Marc Mamin

Responses

pgsql-bugs by date

Next:From: Gary WongDate: 2011-06-14 17:08:21
Subject: Postgresql 9.0.4 initdb bug on solaris 64 bit
Previous:From: Tom LaneDate: 2011-06-14 14:55:27
Subject: Re: BUG #5798: Some weird error with pl/pgsql procedure

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group