Chcete-li nahradit pevný řetězec, použijte jednoduchý replace() funkce.
Chcete-li nahradit dynamický řetězec, můžete použít regexp_replace() takhle:
UPDATE
YourTable
SET
TheColumn = regexp_replace(
TheColumn, 'https://[^:\s]+:9999(\S+)', 'https://example2.com\1', 'g'
)