I'm working with an Oracle DB and I'm trying to find and extract ALL occurrences in a string matching a specific pattern...
It's supposed to be 3 letters, 3 numbers and then maybe a letter or not
I tried this:
SELECT REGEXP_SUBSTR(my_column, '[A-Za-z]{3}(\d)(\d)(\d)') AS values
FROM my_table
but it only returns the first occurrence.
Using
REGEXP_SUBSTR(my_column, '[A-Za-z]{3}(\d)(\d)(\d)', 0, 0, 'i')
doesn't work either
Does anybody have any ideas?
Edit:
I'm trying to extract it from PLSQL files. So its pretty much like SQL queries like
select *
from abc123
where some_value = 'some_value'