You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Ulrich Kramer (Jira)" <ji...@apache.org> on 2025/03/28 10:44:00 UTC

[jira] [Updated] (CALCITE-6923) REGEXP_REPLACE backward references not working

     [ https://issues.apache.org/jira/browse/CALCITE-6923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ulrich Kramer updated CALCITE-6923:
-----------------------------------
    Priority: Minor  (was: Major)

> REGEXP_REPLACE backward references not working
> ----------------------------------------------
>
>                 Key: CALCITE-6923
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6923
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.38.0
>            Reporter: Ulrich Kramer
>            Priority: Minor
>
> REGEXP_REPLACE builtin function differs from Postgres/BigQuery
> The builtin function is using {{$1}} for backward reference. Postgres and [BigQuery|https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_replace] are using {{\1}}.
> {code:SQL}
> SELECT REGEXP_REPLACE('abc','([bc]+)','$1','g')
> {code}
> produces {{abc}}. Running the same query against Postgres or BigQuery will return {{a$1}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)