Oracle regexp_replace every occurence
I want to replace the every occurence of String expect the first occurence
using regexp_replace. below query will repalce only Second occurence.
select 'This is test STRING STRING some text STRING some more text' from dual
select regexp_replace('This is test STRING STRING some text STRING some
more text','STRING', 'REPLACED-STRING' , 1,2) from dual
Results is
This is test STRING REPLACED-STRING some text STRING some more text
But I need result like
This is test STRING REPLACED-STRING some text REPLACED-STRING some more text
No comments:
Post a Comment