On Saturday 17. September 2011 13.21.43 Leif Biberg Kristensen wrote:
> UPDATE sources SET source_text = regexp_replace(source_text,
> E'n="(.*?)$1(.*?)"', E'n="\\1$2\\2"', 'g') where source_text like
> '%n="%$2%">%';
Sorry, I pasted a literal replacement, and substituted the parameters by hand.
The expression should of course be
UPDATE sources SET source_text = regexp_replace(source_text,
E'n="(.*?)$1(.*?)"', E'n="\\1$2\\2"', 'g') where source_text like
'%n="%$1%">%'
regards, Leif