I'm having a clob with pl/sql code inside.
I have to check if there is no exit command inside at the end.
So the following is not allowed:
Some code ...
exit
Or
Some code ...
exit;
Or
Some code ...
exit
/
But the following is allowed:
Some code ...
exit when ... Some code ...
Or
Some code ...
Some other code ... -- If this happens than exit
Some code ...
I've tried with the following piece of code, but that doesn't work:
if regexp_instr(v_clob, chr(10) || 'exit[;]?[^[[:blank:]]]', 1, 1, 0, 'i') != 0 then