Closed
Description
What happens?
regexp_replace
silently returns the original string if the regexp pattern contains errors.
This is not the case for regexp_matches
.
To Reproduce
regexp_replace
seems to ignore errors:
select regexp_replace('abc', '*', 'X');
Postgres throws an error: "invalid regular expression"
DuckDB returns abc
But regexp_matches
properly throws errors:
select regexp_matches('abc', '*');
DuckDB and Postgres both complain about the invalid regular expression.
OS:
Ubuntu
DuckDB Version:
v1.2.1-dev629 d9ee15f
DuckDB Client:
shell
Hardware:
No response
Full Name:
Altan Birler
Affiliation:
TUM
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a source build
Did you include all relevant data sets for reproducing the issue?
Yes
Did you include all code required to reproduce the issue?
- Yes, I have
Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?
- Yes, I have