REGEXP_REPLACE Function Examples | VantageCloud Lake - REGEXP_REPLACE Function Examples - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
SELECT REGEXP_REPLACE('Hello World World', '(world)$', 'My', 1, 1, 'i'); 

Output:

"Hello World My"
SELECT REGEXP_REPLACE('Friday is the best day of the week.', 'of the week', 'EVER', 1, 1, 'c'); 

Output:

'Friday is the best day EVER'
SELECT REGEXP_REPLACE('Hello Santa says ho ho', 'ho', 'HO!', 1, 2, 'c'); 

Output:

'Hello Santa says ho HO!'