FROM
10. Black Hole Sun_Soundgarden
TO
10. Soundgarden_Black Hole Sun
I found this in here
- Code: Select all
var char2find = "_";
var index = name.lastIndexOf(char2find);
newName = name.substr(index+1) + char2find + name.substr(0,index);
But that moves the band name in front of the number. I have tried to tweak it to fit my needs but have come up short.
Can some let me know what I am doing wrong? Any help is greatly appreciated.