Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.38.0
Description
REGEXP_REPLACE builtin function differs from Postgres/BigQuery
The builtin function is using $1 for backward reference. Postgres and BigQuery are using \1.
SELECT REGEXP_REPLACE('abc','([bc]+)','$1','g')
produces abc. Running the same query against Postgres or BigQuery will return a$1.
Attachments
Issue Links
- is related to
-
CALCITE-6921 REGEXP_REPLACE with empty string causes Exception
-
- Closed
-
- relates to
-
CALCITE-5858 Add REGEXP_CONTAINS, REGEXP_EXTRACT, REGEXP_EXTRACT_ALL, REGEXP_INSTR, REGEXP_REPLACE and REGEXP_SUBSTR functions (enabled in BigQuery library)
-
- Resolved
-
- links to