From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: devops@key2asset.com
Subject: BUG #18870: weird behavior with regexp_replace
Date: Thu, 27 Mar 2025 13:43:50 +0000
Message-ID: <18870-70cd953a0c92c20e@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 18870
Logged by: reinko
Email address: devops@key2asset.com
PostgreSQL version: 17.4
Operating system: Ubuntu 11.4.0-1ubuntu1~22.04
Description:
select regexp_replace(LOWER('Örebro'), '\W', '_', 'g') in postgres 15 the
result is örebro which is correct since ö should fit in the \w for a
regex.
select regexp_replace(LOWER('Örebro'), '\W', '_', 'g') --> since postgres 17
the result is _rebro which is incorrect since \w should also contain
characters like ö, ä, ë.
the to lower is not really relevant to this issue the same happens when it's
just a direct string aswell.
this issue happens with alot of special a-z characters é, è have the same
issue for example.
Kind regards,
Reinko Brink
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, devops@key2asset.com
Subject: Re: BUG #18870: weird behavior with regexp_replace
In-Reply-To: <18870-70cd953a0c92c20e@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox