On Friday, January 15, 2021, PG Bug reporting form <
noreply@postgresql.org> wrote:
The following bug has been logged on the website:
Bug reference: 16826
Logged by: James Inform
Email address: james.inform@pharmapp.de
PostgreSQL version: 13.1
Operating system: Mac and Ubuntu
Description:
Hopefully I am not messing up regex syntax, but it seems that handling of
non-greedy is not correct in substring function's regex.
When I set the non-greedy operator ? inside a regex in the substring
function, everything after the ? seems to be also treated as non-greedy,
which is wrong.
This seems to behave per the documentation in 9.7.3.5
Implementations of regex do differ so referencing prior experience for correctness has limits.
David J.