Hello,
The following surprised me enough to think it might be a bug:
(17devel)
select
regexp_replace('Abc Def'
, '([a-z]) ([A-Z])'
, '\1 ' || lower('\2') );
regexp_replace
----------------
Abc Def
(1 row)
-- 'Abc Def' got
-- 'Abc def' expected
What do you think?
Thanks,
Erik Rijkers