I have a string(or two records) of the type:
a) C:\Users\user1\Pictures\1.JPG
b) C:\Users\user1\Pictures\file_example_TIFF_1MB.tiff
I am using the following query to extract the name of the file and I am only able to pull the 1st record out (1.JPG). How can I pull both - first and second (1.jpg and file_example_TIFF_1MB.tiff) including any file extension (whether upper or lower case).
When I use this:
select dt, seq, message,REGEXP_SUBSTR(message, '[0-9]+(.JPG|.TIFF|.tiff)+')
from log_output_table where seq in (23438852,23438853);
Output is only : 1.JPG
When I use this:
select dt, seq, message,REGEXP_SUBSTR(message, '[[:alnum:]]+(.JPG|.TIFF|.tiff)+')
from log_output_table where seq in (23438852,23438853);
Output is:
1.JPG
example_TIFF
Can anyone help me out? Thanks in advance.