Simple sequence rename???

A swapping-ground for Regular Expression syntax

Simple sequence rename???

Postby asagy » Wed Sep 25, 2013 5:06 pm

Can you help plse, I have hundreds of files where I want to change the sequence from ABC - Agatha Christie.txt to Agatha Christie - ABC.txt Can you help please?
asagy
 
Posts: 3
Joined: Sat Sep 21, 2013 1:01 pm

Simple match depends on simple conditions

Postby truth » Wed Sep 25, 2013 11:25 pm

Simplicity will depend on the varying filename-conditions to be matched
Assuming you only want to match: AllCaps(no-spaces,etc)Space-SpaceAuthorName
This 1regex works on that very limited set of filenames:
^([A-Z]+)( - )(.+)
\3\2\1

I'd imagine you may need to match more than that?
If so, just post back with more conditions or examples
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay


Return to Regular Expressions