Remove part of one field and append to another field

Here's my situation. I have tracks with the singer in the song title, like so:

Title: Yo soy el tango - Francisco Fiorentino

And the artist is the orquesta director:

Artist: Aníbal Troilo

I want to move the singer into the Artist field, like so:

Artist: Aníbal Troilo / Francisco Fiorentino

I've looked at old questions similar to this but they all involve completely replacing the destination field, and mention a Guess Values action that I can't find in the Mac version of MP3Tag. I tried using the $regexp() function but it just appends "%title%" to the Artist field:

Replace with Regular Expression
Field: TITLE
Regexp: $
Replace: $regexp(%title%," -\s(.*)\s$," / $1")

So I wind up with this:

Artist: Aníbal Troilo%title%

It looks like %title% is being treated as a string literal rather than a placeholder for another field.

Oh it looks like Guess Values got renamed to Import Tag Fields.

Now that I know that, I can make the solution from here work: Moving [Feat. Artist] from Title to Artist - #5 by Florian

You have to enter the regular expression where it says "Regexp" - which would be the part -\s(.*)\s$
And enter the Replace part with $1

I have not checked whether the expression leads to the result that you intend.

I think that would just remove the title and leave a slash followed by the singer's name. I don't know why $regexp() doesn't work in the Replace box, but I got the result I want using Import Tag fields. Thanks for offering the suggestion though!

You could use that type of action with:
Source: %artist% / $regexp(%title%,(.*) - (.*),$2==$1)
Target: %artist%==%title%

$regex() is a scripting function that can only be used in Format strings. In the action of the type "Replace with regular expression" you have to enter just the patterns that in the end make up the regular expression.
And if in doubt, check the documentation:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.