Renaming Karaoke Files HELP!

A swapping-ground for Regular Expression syntax

Renaming Karaoke Files HELP!

Postby FTAGuy71 » Wed Nov 26, 2008 8:15 am

I've been trying to figure out how to change the example below, I hope someone can help

What i have:
SF166-07 - Elvis Presley - Jailhouse Rock.zip

What I would like to change it to:
SF166-07 - Presley, Elvis - Jailhouse Rock.zip

I've figured out using:
( [A-Za-z]*) ([A-Za-z]*)(.*)
\2,\1\3

Gets me this
Presley, Elvis - Jailhouse Rock.zip

But im missing my catalogue number. I know im missing something. Any Help would be greatly appreciated!
Thanks
FTAGuy71
 
Posts: 3
Joined: Wed Nov 26, 2008 8:09 am

Re: Renaming Karaoke Files HELP!

Postby jimwillsher » Wed Nov 26, 2008 12:34 pm

You probably need (.*\s-) at the front, so that the swapping code doesn't take effect until the next group. Remember to add one to your \1 \2 stuff.


Jim
jimwillsher
 
Posts: 63
Joined: Wed Sep 24, 2008 1:22 pm

Re: Renaming Karaoke Files HELP!

Postby FTAGuy71 » Thu Nov 27, 2008 1:31 am

Thanks for you help...turns out that does work..but i have different names and It works with some but not others....not sure if i can make one formula to change all of them.
FTAGuy71
 
Posts: 3
Joined: Wed Nov 26, 2008 8:09 am

Re: Renaming Karaoke Files HELP!

Postby GMA » Thu Nov 27, 2008 5:52 am

Hi,
Here's another formula:

RegEx (1):
MATCH: (.*?) - (.*) (.*) - (.*)
REPLACE: \1 - \3, \2 - \4

It's a little more inclusive, since it will allow you to change all of the following:

YOUR MODEL:
SF166-07 - Elvis Presley - Jailhouse Rock.zip
to
SF166-07 - Presley, Elvis - Jailhouse Rock.zip

ARTIST NAMES WITH THREE OR MORE WORDS:
SF166-07 - Stevie Ray Vaughan - Boot Hill.zip
to
SF166-07 - Vaughan, Stevie Ray - Boot Hill.zip

ARTIST NAMES WITH NON-LETTER CHARACTERS (in this example the ' between the O and the C):
SF166-07 - Sinead O'Connor - Nothing Compares 2 U.zip
to
SF166-07 - O'Connor, Sinead - Nothing Compares 2 U.zip

There's just one thing: it can't differentiate this kind of situations:

Name Name LastName > The formula will put the last word at the begining (3, 1 2), and that's correct.
Name LastName LastName > The formula will put the last word at the begining (that's what it'll always do), but in this case that's incorrect; it should be 2 3, 1 since it is a compound last name.

Necessarily you're gonna need your human knowledge to distinguish that; no formula or software is THAT smart :)
Best regards,

Gabriel

P.S.:
NOTE TO THE DEVELOPERS: The RegEx field seems to have problems with accentuated and probably other special characters. Just to follow the examples, if the name of the file is "SF166-07 - Paco de Lucía - Some song.zip" the expression will just refuse to do any kind of change because of the "í" in "Lucía".
I haven't made a complete testing, but the other fields (Replace, Remove, Numbering, etc.) don't have that problem, and their respective operations are done just fine.
GMA
 
Posts: 91
Joined: Sun Dec 02, 2007 1:30 pm
Location: Argentina

Re: Renaming Karaoke Files HELP!

Postby FTAGuy71 » Tue Dec 02, 2008 5:58 pm

Fantastic, Thanks for the help with this.... works great!
FTAGuy71
 
Posts: 3
Joined: Wed Nov 26, 2008 8:09 am


Return to Regular Expressions