[ https://issues.apache.org/jira/browse/FLINK-34477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Anderson updated FLINK-34477: ----------------------------------- Description: For example, I would expect this query {code:java} select REGEXP_REPLACE('ERR1,ERR2', '([^,]+)', 'AA$1AA'); {code} 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. was: For example, I would expect this query {code:java} select REGEXP_REPLACE('ERR1,ERR2', '([^,]+)', 'AA$1AA'); {code} 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. > 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 > Affects Versions: 1.18.1 > Reporter: David Anderson > Priority: Major > > For example, I would expect this query > {code:java} > select REGEXP_REPLACE('ERR1,ERR2', '([^,]+)', 'AA$1AA'); {code} > 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)