0
select REGEXP_REPLACE (' if function_text() hi how do you do text_jon','(test\S.*)','',1,0,'m') from dual;

Output for this:

if function_

I don't want this "if function_" too i.e null output should be there

How to achieve the above?

J. Chomel
  • 8,193
  • 15
  • 41
  • 69
BeastLesnar
  • 71
  • 1
  • 3
  • 7
  • This seems to be a follow-up to [your previous question](http://stackoverflow.com/q/43187038/266304), but there you said the whole line (from a multiline CLOB) had to be completely removed, not just blanked out? Doesn't the pattern given there work if you do just want to blank (not remove) it (if you add the `\S` anyway, which is a new but minor tweak - i.e. `''.+test\S.*''`)? (Also should your example have `function_test` not `function_text`?) – Alex Poole Apr 04 '17 at 09:59
  • Be a bit more descriptive. Give some more sample rows and your expected output on those rows – Utsav Apr 04 '17 at 10:30
  • @Alex Thanks It worked – BeastLesnar Apr 04 '17 at 10:45

0 Answers0