I have am trying to extract certain IDs from the comments column. Comments columns includes alpha numeric, only numeric, only alphabet values but I need to extract ID which will be 5 characters and plus.
Is there a code to select only records with numeric values which are consecutive like 19555? If numeric values are between characters like AB22CD33EF55 are not valid IDs.
I was think of a process of identifying first numeric value as T1 and next non-numerical value as T2. Then my filter set is going to be (T2 = 0) OR ((T2 - T1) > 4). Need help to determine T2 or any alternative approach.
REGEXP_INSTR(COMMENTS, '[0-9]') == 4 (eg ACB19955)
COMMENTS
----------------
ABCDE
ACB19955
AB19CDEF
16448
TYU223IO
--17663
TY18667
AB15889CD
RESULTS
------------
19955
16448
17663
18667
15889