Skip to content

Fix Trino REGEXP_REPLACE backreference syntax#837

Open
piotrrzysko wants to merge 1 commit intoClickHouse:mainfrom
piotrrzysko:fix-trino-regexp_replace
Open

Fix Trino REGEXP_REPLACE backreference syntax#837
piotrrzysko wants to merge 1 commit intoClickHouse:mainfrom
piotrrzysko:fix-trino-regexp_replace

Conversation

@piotrrzysko
Copy link
Copy Markdown

The replacement string used \1 instead of $1 (Trino syntax). In Trino, \1 is interpreted as an escape followed by the literal character 1, so the query was producing 1 instead of the captured domain name.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 29, 2026

CLA assistant check
All committers have signed the CLA.

@piotrrzysko piotrrzysko changed the title Fix Trino REGEXP_REPLACE backreference syntax in Q29 Fix Trino REGEXP_REPLACE backreference syntax Apr 29, 2026
The replacement string used `\1` instead of `$1` (Trino syntax).
In Trino, `\1` is interpreted as an escape followed by the literal
character `1`, so the query was producing `1` instead of the captured
domain name.
@piotrrzysko piotrrzysko force-pushed the fix-trino-regexp_replace branch from 73e9b68 to 0d7b455 Compare April 29, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants