I am trying to extract a value between the brackets from a string.
Here(How to extract a string between brackets in oracle sql query), it is explains how to do.
But in my situation, the string has 2 lines. With this way, I get only NULL.
SELECT REGEXP_SUBSTR('Gupta, Abha (01792)', '\((.+)\)', 1, 1, NULL, 1) FROM dual --01792
SELECT REGEXP_SUBSTR('Gupta, Abha (01
792)', '\((.+)\)', 1, 1, NULL, 1) FROM dual -- NULL
I known that i can remove the break line symbol and then use regex_substr but i need to keep the break line symbol