-- specific regex for just #222 pattern
select regexp_replace(column_c, 'abc#222 \(Format: NNN\) ', 'abc#333 \(Format: NNN\) ') from table_a;
-- More general purpose for any number in the source pattern, note the \d+ regex
select regexp_replace(column_c, 'abc#(\d+) \(Format: NNN\) ', 'abc#333 \(Format: NNN\) ') from table_a;
-- And an update to do the replace
update table_a set column_c = regexp_replace(column_c, 'abc#(\d+) \(Format: NNN\) ', 'abc#333 \(Format: NNN\) ');
|