I have a list of filenames like this:
datalist
EU_AU_abc100.dat
EU_AU_abc200.dat
EU_AU_abc300.dat
EU_AU_abc.dat
I want to have this:
abc100
abc200
abc300
abc
How can I do that? I know the substr(datalist, start = 6, stop = 12)
for example, but that doesnt suit for the last example. Any idea how to solve this? Can I use the .dat as stop-marker somehow?