du kan prova den här frågan.
with test as(
select 'ABC12345, DE22222' as JOB_Description from DUAL union
select 'Please help to repair ABC12345, DE22222' as JOB_Description from DUAL
)
SELECT REGEXP_SUBSTR(JOB_Description, '(ABC|DE)([[:digit:]]){5}', 1, LEVEL) AS substr
FROM test
CONNECT BY LEVEL <= REGEXP_COUNT(JOB_Description, '(ABC|DE)([[:digit:]]){5}')
AND PRIOR JOB_Description = JOB_Description
AND PRIOR DBMS_RANDOM.VALUE IS NOT NULL
Resultat:
ABC12345
DE22222
ABC12345
DE22222
En bra förklaring av de två sista raderna finns här