In the text below, the word number appears twice. I want to not replace the word which appears between a pattern <a hef and a>
. Is there a way to avoid the word between this pattern using just the regexp_replace?
The code doesn't work as expected.
with t as (
select 'The Number can be a whole number. <a href https://number.com a>' as text from dual)
select regexp_replace(text,'^[<a href].*number.*[a>]','num') from t
The expected outcome is
The num can be a whole num. <a href https://number.com a>