I have files names in the below format -
India_AP_Dev1.txt
USA_GA_QA2.txt
USA_NY_AWSDev1.txt
AUS_AA_BB_QA4.txt
I want to extract only the environment part from the file name i.e. Dev1, QA2, AWSDev1, QA4
etc. How can I go about with this type of file names. I thought about substring
but the environment length is not constant. Is it possible to do it with regex
Appreciate your help. TIA