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)

Reply via email to