You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "David Anderson (Jira)" <ji...@apache.org> on 2024/02/20 17:43:00 UTC

[jira] [Created] (FLINK-34477) support capture groups in REGEXP_REPLACE

David Anderson created FLINK-34477:
--------------------------------------

             Summary: support capture groups in REGEXP_REPLACE
                 Key: FLINK-34477
                 URL: https://issues.apache.org/jira/browse/FLINK-34477
             Project: Flink
          Issue Type: Improvement
          Components: Table SQL / API
            Reporter: David Anderson


For example, I would expect this query
{code:java}

{code}
{{select REGEXP_REPLACE('ERR1,ERR2', '([^,]+)', 'AA$1AA'); }}

 

to produce
{code:java}
AAERR1AA,AAERR2AA{code}
but instead it produces
{code:java}
AA$1AA,AA$1AA{code}
With FLINK-9990 support was added for REGEXP_EXTRACT, which does provide access to the capture groups, but for many use cases supporting this in the way that users expect in REGEXP_REPLACE would be more natural and convenient.



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