I want to remove middle string which is date and get the value in postgres
Example
From this
ABC_XYZ_20200129041836.csvor2ABC_XYZ_20200129041836.txt
to this
ABC_XYZ.csvor2ABC_XYZ.txt
I tried this regex [^_]+$. which selects all strings after last occurence of _ including after . (e.g., _20200129041836.csv)