Last Name, First Name & His Orchestra > First Name Last Name & His Orchestra

Hello everyone,

I have searched here and have found how to convert :
First Name Last Name to Last name, First name
&
Last Name, First Name to First Name Last Name

But I have not found, nor can I figure out how to, change and artist that is accompanied by a band listed as

Last Name, First Name & his orchestra
to
First name Last name & His orchestra.

Any help would be sincerely appreciated. Thanks in advance!

You could use this in an action of the type "Format value":
Format string: $regexp('Last Name, First Name & his orchestra','(.*), (.*) (&.*)', $2 $1 $3)
-> " First Name Last Name & his orchestra"

Thanks ohrenkino,
The problem is that I have a bunch of bands and the only labeled last name, first name is the first two words, which are the band leader. Sometimes it will be "& his orchestra,"other examples are "y su estrellas" or "with his lonely boys" etc. So I just need the first 2 words changed from the last, first to first last and the rest should stay the same.

Also, if you could also let me know how to do it with individuals who have a middle name, 2 last names, or a nickname, for example:
Ray Vaughan, Stevie & Michael Jackson
Lopez, Israel "Cachao" & su ritmo caliente
William, Henry Frank & the Crazy Cajuns

I tried "(.), (.) (.)" replace with "$2 $1 $3" but it does not work.
If it did I could experiments with variants such as
"(.
), (.) (.) (.*)" replace with "$2 $3 $1 $4" for William, Henry Frank & the Crazy Cajuns, but I need to figure out why it does not work. I really wish I could wrap my head around regular expressions but as much as I try it eludes me.

I would also like to do the reverse, to go from First Name Last & his orchestra or first name last name y su estrellas to Last name, first name & his orchestra or Last name, First name y su estrellas.

I am hope once you give a couple of examples I can figure out how to construct the variants.

Thanks again for your help! :clap:
(I am not sure why some of the text above shows in italics)

The trick is that you need some sort of unique separators so that MP3tag gets a hint where to split the data.
MP3tag cannot really read.
So, you would have to see what the separator is:
Could be the "&"
Could be the "y"
and probably many more. The regular expression that describes the pattern would have to be adapted accordingly. (And you would have to look out for bands that should be left untouched like "Emerson, Lake & Palmer" or "Dave Dee, Dozy, Beaky, Mick & Tich" and probably many more.
To get Stevie Ray Vaughn right again:
$regexp('Ray Vaughan, Stevie & Michael Jackson','(.*), (.*) & (.*)',$2 $1 & $3)
(insert the field name instead of the string in the first part of the expression)

PS: Enclose any code snippets in accent grave (top left to bottom right) - otherwise asterisks and other characters may get interpreted as formatting instructions

I understand. Could a space " " be a separator? So I can say there will be one term, then a second, then everything after the space after the second term would be left untouched.

could "\s" work as a separator?

I doubt that. If you look at the example

then the first space character is right after "Ray" - and if "Vaughan, Stevie & Michael Jackson" is left untouched then it would stay the way it is.
The only thing that I wanted to point out: you shouldn't let this action do its work unattended but only for the cases where you are sure that it leads to the correct result.
So you could filter for tracks that have "orchestra" as part of the artist name:
%artist% HAS orchestra

Or filter for tracks that have a comma and an ampersand and see which are the odd ones out:
%artist% HAS & AND %artist% HAS ,

OK I will try that out. Thanks!