можете да опитате тази заявка.
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
Резултат:
ABC12345
DE22222
ABC12345
DE22222
Добро обяснение на последните два реда можете да намерите тук