regexp_replace weirdness amounts to a bug?

From: Erik Rijkers <er(at)xs4all(dot)nl>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: regexp_replace weirdness amounts to a bug?
Date: 2023-08-16 09:09:02
Message-ID: 8371a323-d44c-0790-c018-603753023140@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Malthe 2023-08-16 09:09:05 Re: regexp_replace weirdness amounts to a bug?
Previous Message Fabien COELHO 2023-08-16 08:06:09 Re: pgbench - adding pl/pgsql versions of tests