regexp_replace not respecting greediness
От | Simon Ellmann |
---|---|
Тема | regexp_replace not respecting greediness |
Дата | |
Msg-id | 1B268DC1-F058-4243-B6F8-71451FB68F08@tum.de обсуждение исходный текст |
Ответы |
Re: regexp_replace not respecting greediness
Re: regexp_replace not respecting greediness |
Список | pgsql-bugs |
With the following regular expression, the second .* seems to match non-greedily although (if I am correct) it should match greedily:
postgres=# SELECT REGEXP_REPLACE('jane.smith@example.com', '.*?@.*', 'ab');
regexp_replace
----------------
abexample.com
(1 row)
Other database systems (e.g., DuckDB, Umbra) match the whole input: https://analytics.db.in.tum.de/?q=SELECT+REGEXP_REPLACE%28%27jane.smith%40example.com%27%2C+%27.*%3F%40.*%27%2C+%27ab%27%29%3B
Affected version: PostgreSQL 17.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 15.2.1 20250813, 64-bit
Cheers,
Simon
Simon
--
Research associate
Chair for database systems
Department of Informatics
TU München Tel: +49 89 289 17276
Boltzmannstr. 3 E-Mail: simon.ellmann@tum.de
D-85748 Garching bei München, Germany
Research associate
Chair for database systems
Department of Informatics
TU München Tel: +49 89 289 17276
Boltzmannstr. 3 E-Mail: simon.ellmann@tum.de
D-85748 Garching bei München, Germany
В списке pgsql-bugs по дате отправления: