Two Renaming Things I can't Figure out.

A swapping-ground for Regular Expression syntax

Two Renaming Things I can't Figure out.

Postby OzDrDj » Tue Apr 28, 2015 5:14 am

Hi All,
Bet someone knows or can point me in the right direction.
I've got heaps and heaps and heaps of Karaoke tracks I want to rename.
I have cleaned them up as best i could and did pretty well, but the last 2 have me.

Croce, Jim - Bad Bad Leroy Brown
Presley, Elvis - All Shook Up
Rex, T - Bang A Gong

So, I want to reverse the names....
and then the Titles, either or either way first, to leave me with

Babd Bad Leroy Brown - Jim Croce
All Shook Up - Elvis Presley
Bang A Gong - T Rex

Thanks for your help.
OzDrDj
 
Posts: 5
Joined: Tue Apr 28, 2015 5:06 am

Swap rearrange parts around comma and hyphen

Postby Stefan » Tue Apr 28, 2015 6:34 am

FROM:
Croce, Jim - Bad Bad Leroy Brown
Presley, Elvis - All Shook Up
Rex, T - Bang A Gong
TO:
Bad Bad Leroy Brown - Jim Croce
All Shook Up - Elvis Presley
Bang A Gong - T Rex

RULE:
Match first part till first comma, >>> (.+), >>> store as \1
match second part after comma till first hyphen >>> (.+) - , >>> store as \2
match all after first hyphen till the end >>> (.+), >>> store as \3
Rearrange as wanted, add space and hyphen yourself: \3 - \2 \1


USE:
RegEx(1)
Match: (.+), (.+) - (.+)
Repla: \3 - \2 \1


 

 
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Re: Two Renaming Things I can't Figure out.

Postby OzDrDj » Tue Apr 28, 2015 7:55 am

Hi There,
Clearly I need to read the instructtions a bit better. I have no idea what you did there, lol.
But it certainly is a good guide to trying to work it out.
Thanks for the Reply
Col
OzDrDj
 
Posts: 5
Joined: Tue Apr 28, 2015 5:06 am

Re: Two Renaming Things I can't Figure out.

Postby OzDrDj » Tue Apr 28, 2015 7:59 am

Also, what do i do with the others inbetween

such as

Croce, Jim - Bad Bad Leroy Brown
Abba - Dancing Queen
Presley, Elvis - All Shook Up
Cher - Gypsys, Tramps and Thieves
Rex, T - Bang A Gong
ACDC - T-N-T

Theres always someone who has the delimiters in the title, such as the commas and dashes, which i try to fix manually anyway.
But still, not all names are in 2 parts, maybe 50/50
OzDrDj
 
Posts: 5
Joined: Tue Apr 28, 2015 5:06 am

Re: Two Renaming Things I can't Figure out.

Postby OzDrDj » Tue Apr 28, 2015 8:06 am

Ok, So I fixed that, another program (sorry, but it is Winsome File Renamer)
It has an automatic command, Switch Name From, so typing in " - " switched them all instantly.

So now they are all

Song Title - Band
Song Title - Name, Artist
Song Title - Band
Song Title - Name, Artist

So just have to get that "Name, Artist" to "Artist Name"

Is there some sort of wildcard ?

ie rename "- (Wildcard1), (Wildcard2)" to "- (Wildcard1) (Wildcard2)"
or is that something to do with the /1 /2 thing?
OzDrDj
 
Posts: 5
Joined: Tue Apr 28, 2015 5:06 am

Re: Two Renaming Things I can't Figure out.

Postby OzDrDj » Sat May 02, 2015 2:53 am

Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh,
I get it now, woohooo
Thanks Thanks Thanks......
OzDrDj
 
Posts: 5
Joined: Tue Apr 28, 2015 5:06 am


Return to Regular Expressions