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)


Affected version: PostgreSQL 17.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 15.2.1 20250813, 64-bit

Cheers,
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

В списке pgsql-bugs по дате отправления: