Renaming syntax - Song-title - Arist > Artist - Song-Title

A swapping-ground for Regular Expression syntax

Renaming syntax - Song-title - Arist > Artist - Song-Title

Postby ibizatryxx » Thu Oct 03, 2013 11:44 pm

Hi All,

Great problem am new to it and already figuring out a couple of good tricks.

Am stuck on my final end on renaming files

Currently I have song-title - artist

i need to change them all to artist - song-title

any ideas?
ibizatryxx
 
Posts: 3
Joined: Thu Oct 03, 2013 11:40 pm

Song-Title - Artist >> Artist - Song-Title

Postby truth » Fri Oct 04, 2013 9:34 am

We will probably need more filename details, but you can start by previewing:
1Regex
(.+-.+)( - )(.*)
\3\2\1

If you have any issues, like filenames with multiple ocurrences of Space-Space, etc
Post back with details for something more customized
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay

Re: Renaming syntax - Song-title - Arist > Artist - Song-Title

Postby ibizatryxx » Sat Oct 05, 2013 4:47 am

Hi Truth,

Thanks for getting back to me.

I put the following in and nothing changed.

RegEx (1) section
Match = (.+-.+)( - )(.*)
Replace = \3\2\1

Am I doing something wrong?

File names should be as everything is Songtitle - Artist example, Hotel California - Eagles.acc
ibizatryxx
 
Posts: 3
Joined: Thu Oct 03, 2013 11:40 pm

SongTitle - Artist -> Artist - SongTitle

Postby truth » Sat Oct 05, 2013 6:00 am

You're doing nothing wrong, the 1st regex only matches song-titles with a hyphen inbetween.
It was tailored to match your 1st example of song-title - artist
Now that we know you also need to match... song title - artist
Try the below 1Regex instead:
(.+)( - )(.+)
\3\2\1

This assumes the last Space-Space always separates SongTitle from Artist.
If that's not always the case, post back with more details.
Last edited by truth on Sun Oct 06, 2013 12:24 am, edited 1 time in total.
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay

Re: Renaming syntax - Song-title - Arist > Artist - Song-Title

Postby ibizatryxx » Sat Oct 05, 2013 10:32 am

Hi Truth,

Thanks for that it worked %100.

Appreciate your time and efforts.

Thanks again.
ibizatryxx
 
Posts: 3
Joined: Thu Oct 03, 2013 11:40 pm


Return to Regular Expressions