Hello everyone,
I'm not an expert with regex at all, and I need your help
here's what I want to do, I have hundreds of file like this :
[ul]file-002.txt
another-file-524.txt
one-more293-here-25.txt[/ul]
and want to rename them like this :
[ul]002-file.txt
524-another-file.txt
25-one-more293-here.txt[/ul]
But I want to keep the source file as is, I don't want to delete them, and they both have to be in the same folder at the end :
[ul]002-file.txt
524-another-file.txt
25-one-more-here.txt
file-002.txt
another-file-524.txt
one-more293-here-25.txt[/ul]
I'm using this regex to rename them, and it seems to be ok, i only need to keep a copy now :
old name : ([a-zA-Z0-9._%+-])(-)([0-9]).(.*)
new name : \3\2\1.\4
Thanks in advance for your help/advices.