By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
WITH yourTable AS (
SELECT '12_23_AB245-F5' AS ColumnA FROM dual UNION ALL
SELECT '66_78_HJ378-G5567' FROM dual UNION ALL
SELECT '55_16_GC761-B99898' FROM dual
)
SELECT ColumnA, REGEXP_SUBSTR(ColumnA, '[0-9]+$') AS last_digits
FROM yourTable;
COLUMNA | LAST_DIGITS |
---|---|
12_23_AB245-F5 | 5 |
66_78_HJ378-G5567 | 5567 |
55_16_GC761-B99898 | 99898 |