[SOLVED] Help with filename parts move

A swapping-ground for Regular Expression syntax

[SOLVED] Help with filename parts move

Postby gereqi » Sat Apr 01, 2017 9:23 pm

Hello to all

I am a newbie, found this great utility a long time ago and have been using it to rename mostly files by just appending numbers or random text.
Now I must change a lot of file names from

AAA-BBB-CCC.EXT

to

BBB-AAA-CCC.EXT

I tried many regexp expressions without any result. The dash is the delimiter in the filename, so I must swap places of first part with second part in the file name, split by dash symbol.

Any help please ?

Thanks
Last edited by gereqi on Sun Apr 02, 2017 10:18 am, edited 1 time in total.
gereqi
 
Posts: 2
Joined: Sat Apr 01, 2017 9:19 pm

Re: Help with filename parts move

Postby KenP » Sat Apr 01, 2017 9:39 pm

This will do what you want.

RegEx (1)
Match: ([^-]*)-([^-]*)-([^-]*)
Replace: \2-\1-\3
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am

Re: [SOLVED] Help with filename parts move

Postby gereqi » Sun Apr 02, 2017 10:18 am

Thank you so much KenP !
gereqi
 
Posts: 2
Joined: Sat Apr 01, 2017 9:19 pm


Return to Regular Expressions