I am facing the following problem - I want to use REGEXP_REPLACE
to replace the occurrences of all kind of symbols after a given string. Suppose I have the string:
I will send you the parcel today.
best regards (may contain multiple new lines)
Tom
I want to replace everything after 'best regards' with 'someone' so that the output gets:
I will send you the parcel today.
best regards
someone
I tried with:
(best regards)[\w\W]*
but it doesn't seem to work and only best regards gets replaced. Since I thought that the problem was with the new line , I transformed the expression into:
(best regards)[\w\W|\r|\n|\f]*
but it still doesn't work. I tried the expression using : https://www.freeformatter.com/regex-tester.html and it did work.
The column is of type CLOB.