I'm looking for a regexp to get the correct file name from the below string.
Input
Report_18072014.pdf
Expected Output
Report.pdf
The query so far which gives me the correct output.
REPLACE(FILENAME, '_' || TRIM(REGEXP_SUBSTR (FILENAME, '[^_.]+',1,2)))
My question is if there is a better regexp I can use to avoid concatenating _ to the substring in the replace function.