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!'