I want to replace square brackets in string with REGEXP_REPLACE function. Even I escape these chracters it's not replacing
select regexp_replace('VMI[[DATA]]INFO', '[\[\]]', '_') from dual;
result
VMI[[DATA]]INFO
How can we do this? Am I missing something?
Best Answer
You can do it like this:
But I don't think that regular expressions are needed here, you can also use TRANSLATE
Here is a sqlfiddle demo