I'm trying to do a regex match to return a substring between a start and end point.
Given the following table:
WITH test AS (SELECT 'ABCD_EFGH_THIS_IJKL' AS thetext FROM DUAL
UNION SELECT 'ABAB CDCD EG BCD' FROM DUAL)
SELECT *
FROM test
I would want to return the results:
'THIS'
NULL
So it would match THIS in the first string, and nothing in the second string.
For this is safe to assume that ABCD_EFGH preceeds the text i want to match, and _ follows the text I want to match.
Thanks for any help!
EDIT: This needs to work on 10g. Sorry for not making that clear turbanoff.