Expression - Swapping Positions
Posted: 2020-12-24 06:52:03
Hello,
I am curious if Ant Renamer is capable of performing a bit more intricate regex, and if so, could I get a hand figuring my issue out.
I have a metric boat load of karaoke music. The music is all in zip archives. I am trying to format all the music the same, and Ant Renamer has been a huge help! But now I am wanting more.
I am formatting each song as follows...
DISCID-TRACK - ARTIST - TITLE.ext
I have numerous songs named for example...
EXAMPLE1: SC0000-00 - BRAXTON, TONI - I DONT WANT TO.zip
EXAMPLE2: SC0000-00 - INGRAM, JAMES AND TESH, JOHN - GIVE ME FOREVER.zip
EXAMPLE3: SC0000-00 - BEATLES, THE - TWIST AND SHOUT.zip
EXAMPLE4: SC0000-00 - LAST, FIRST AND BIG BAND, THE - SONG TITLE.zip
I would like to swap the artist names back to FIRST LAST and drop the comma's. But I would also like to NOT switch the songs that are "BAND, THE" (EXAMPLE3).
For EXMAPLE1 I am able to accomplish this with,
EXPRESSION:
NEW NAME:
However, this also changes EXAMPLE3 and that's not what I want.
For EXAMPLE2 the following works,
EXPRESSION:
NEW NAME:
However, this also does not take the ", THE" into account (EXAMPLE4).
Is it possible to build a expression that would handle these scenarios, or even a couple separate expressions that I could run? Like I mentioned at the beginning, I'm dealing with a lot of files (over 100k). If I mess this up on a big swath of them, I may never see it until I run crossed it later down the road.
I would appreciate any help! Thank you!
I am curious if Ant Renamer is capable of performing a bit more intricate regex, and if so, could I get a hand figuring my issue out.
I have a metric boat load of karaoke music. The music is all in zip archives. I am trying to format all the music the same, and Ant Renamer has been a huge help! But now I am wanting more.

I am formatting each song as follows...
DISCID-TRACK - ARTIST - TITLE.ext
I have numerous songs named for example...
EXAMPLE1: SC0000-00 - BRAXTON, TONI - I DONT WANT TO.zip
EXAMPLE2: SC0000-00 - INGRAM, JAMES AND TESH, JOHN - GIVE ME FOREVER.zip
EXAMPLE3: SC0000-00 - BEATLES, THE - TWIST AND SHOUT.zip
EXAMPLE4: SC0000-00 - LAST, FIRST AND BIG BAND, THE - SONG TITLE.zip
I would like to swap the artist names back to FIRST LAST and drop the comma's. But I would also like to NOT switch the songs that are "BAND, THE" (EXAMPLE3).
For EXMAPLE1 I am able to accomplish this with,
EXPRESSION:
Code: Select all
(.*) - (.*), (.*) - (.*)
Code: Select all
$1 - $3 $2 - $4
For EXAMPLE2 the following works,
EXPRESSION:
Code: Select all
(.*) - (.*), (.*) (AND) (.*), (.*) - (.*)
Code: Select all
$1 - $3 $2 $4 $6 $5 - $7
Is it possible to build a expression that would handle these scenarios, or even a couple separate expressions that I could run? Like I mentioned at the beginning, I'm dealing with a lot of files (over 100k). If I mess this up on a big swath of them, I may never see it until I run crossed it later down the road.
I would appreciate any help! Thank you!