some_expression;
another_expression;
raise_application_error(-20100
, 'Explanation message.');
expression;
The column has the text above. The text contains raise_application_error function call in more than one lines. I want to get the entire call by RegEX.
SELECT
t.name,
regexp_substr(t.TEXT, 'raise_application_error.*' || CHR(10) || '.*', 1, 1, 'm') as text
FROM user_source t
WHERE t.TEXT LIKE '%raise_application_error%';
The SQL code above returns the only first line: 'raise_application_error(-20100' but I want the entire call. I thought that '|| CHR(10)' would solve the problem but it didn't.
NAME | TEXT |
---|---|
TEXT_I_DO_NOT_WANT | raise_application_error(-20100 |
TEXT_I_WANT | raise_application_error(-20100, 'Explanation message.'); |