Surname Swap

A swapping-ground for Regular Expression syntax

Surname Swap

Postby BLBurns2000 » Wed Apr 03, 2019 4:17 am

I have files marked as within the quotes: "Cline, Patsy - Crazy - XMusicKaraoke.zip"
I would rather have them marked as this: "Patsy Cline - Crazy - XMusicKaraoke.zip"
Having Trouble figuring out the expression to search & swap the existing names as formatted.
As of now I've been Typing a search for exact name "Cline, Patsy" and replace with "Patsy Cline"
Tips would be greatly Appreciated.
BLBurns2000
 
Posts: 1
Joined: Wed Apr 03, 2019 4:11 am

Re: Surname Swap

Postby therube » Wed Apr 03, 2019 12:26 pm

See if this works for you.


1:RegEx
Code: Select all
Match:  (.*?),\s(.*?)\s(.*)
Replace:  \2 \1 \3


Code: Select all
Palacio, Andy - Nabi.mp3   |   Andy Palacio - Nabi.mp3
Rebroff, Ivan - Mutterchen Russland.mp3   |   Ivan Rebroff - Mutterchen Russland.mp3
Crosby, Stills & Nash - See the Changes.mp3   |   Stills Crosby & Nash - See the Changes.mp3


Note the "oddity" with Crosby, Stills & Nash.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Surname Swap

Postby Alimento » Sun Jul 14, 2019 3:47 pm

This is very helpful and is half of what I'm looking for.

Is there a way to do the same thing for the second part of the string?

Example:

Brooks, Garth - Dance, The
to
Garth Brooks - The Dance

Thanks!
Jason
Alimento
 
Posts: 3
Joined: Sat Jul 13, 2019 7:29 am


Return to Regular Expressions