By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
SELECT REGEXP_REPLACE((REGEXP_REPLACE('<p class="notice">...</p>','[p]','div',1,0,'c')),'(notice)','alert',1,0,'c');
REGEXP_REPLACE((REGEXP_REPLACE('<p class="notice">...</p>','[p]','div',1,0,'c')),'(notice)','alert',1,0,'c') |
---|
<div class="alert">...</div> |