Here is the situation
WITH q AS (SELECT '( This is Z12783)' AS sentence FROM DUAL)
SELECT REGEXP_SUBSTR(sentence,'Z[0-9].*')
FROM q;
Desired Output: Z12783
But the Output I get is: Z12783)
Is there a way to remove the ')' at the end within this REGEXP_SUBSTR function?