Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6923

REGEXP_REPLACE_PG_...: backward references behave differently than in postgres

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              kramerul Ulrich Kramer
              kramerul Ulrich Kramer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: