Hello everyone,
Maybe this is something very simple but I am stuck here! this is my sample text: testdef I am looking for "def" that is not "test" before it. so if string contains "testdef" I don't want it but if it is "testAdef" then I want to get Adef (or just def) I tried this:
select regexp_substr('testdef', '[^test]def') from dual;
first it seems working but [^] pattern is just for char list so it is not checking for "test" word, it is checking for lettern t,e,s and t. so in this string:
select regexp_substr('testedef', '[^test]def') from dual;
I would like to get "edef" but since e is in [^] list, it returns null too. I just want any def just not placed a "test" word before it.
how can I do that?
thanks.