Flip Song/Artist to Artist/Song

A swapping-ground for Regular Expression syntax

Flip Song/Artist to Artist/Song

Postby fernandofg » Fri May 26, 2023 10:51 pm

Hi community, I know its already posted but my case is a little bit different. Im going to put 2 examples

FIRST example:

I have
Boom Boom Pow - Black Eyed Peas (Dirty - Hype Edit - Aca In) (130 bpm)
I need
Black Eyed Peas - Boom Boom Pow (Dirty - Hype Edit - Aca In) (130 bpm)

SECOND example:

I have
Boom Boom Pow - Black Eyed Peas - Dirty - Hype Edit - Aca In - 130 bpm
I need
Black Eyed Peas - Boom Boom Pow - Dirty - Hype Edit - Aca In - 130 bpm

I have thousand of files like these, a lot of them uses at the end paragraphs and a lot of them hyphen and others symbols
But the only thing I need is to put first Artist and then Song name, the rest of the file name must keeps at it is

I have tried a lof of regex and non of the are working

Thank you in advance

Best regards :D
fernandofg
 
Posts: 5
Joined: Thu Feb 18, 2016 9:21 pm

Song - Artist (more) --> Artist - Song (more)

Postby Luuk » Sat May 27, 2023 12:11 am

First would need to provide this list of other symbols that can separate the ending of Artist-names??
Otherwise, its probably better to make a list of artist-names, and put them inside of the "Match".
But for these examples, can use a "Match" and "Replace" something like...
^(.+?)( - )(.+?)(( \(| - ).+)
\3\2\1\4

It uses either " (" or " - " at the ending or your Artist-names as separators.
But if any songs or artists have " - " in them, then its better to make a list of Artist-names anyway.
Luuk
 
Posts: 705
Joined: Fri Feb 21, 2020 10:58 pm

Re: Flip Song/Artist to Artist/Song

Postby fernandofg » Thu Jun 01, 2023 12:30 am

Thank you very much

You just save me a lot of time

Regards
fernandofg
 
Posts: 5
Joined: Thu Feb 18, 2016 9:21 pm


Return to Regular Expressions


cron