I have the below regular expression which works perfectly fine using sql, but the same cannot be included in dynamic sql qyery, have tried escaping all the character but it still throws error.
here is what I have tried:
reg := 'select regexp_replace(data, ||'\.||(docx|pdf|msg)|| ', ||'.\1, ') from table where id=1'
Can you help to include this within dynamic sql?
select regexp_replace(data, '\.(docx|pdf|msg) ', '.\1, ') from table where id=1;