"with" from artist to title

Tags: #<Tag:0x00007f31c64fc2d0> #<Tag:0x00007f31c64fc208>

can anyone help me make a script that moved featured artists with the join phrase “with” over to the title field in parenthesis just like the feat. plugin/scrips? i tried to modify the feat. script with no avail

$set(title,$if(%_feat_title%,%title% (%_feat_title%),%title%))

Assuming an artist “Aretha Franklin with David Bowie” I would do…

    $set(title,$rreplace(%artist%,.* with \(.*\),\\1))
    $set(artist,$rreplace(%artist%,\(.*\) with .*,\\1))

A post was split to a new topic: Help with replacing “with” etc. with semicolons

thanks you! this script only moves the feaured artist and replaces the title with it
Black Sun Empire with Noisia - Feed the Machine
Black Sun Empire - Noisia

I haven’t tried it out, but… try:

    $set(title,$rreplace(%artist%,.* with \(.*\),%title% \(with \\1\)))
    $set(artist,$rreplace(%artist%,\(.*\) with .*,\\1))

You may also want to take a look at Writing a File Naming Script — MusicBrainz Picard v2.7.0b1 documentation to understand at the very least what the various parts are (e.g., what is a %variable% and what is a $function etc.) so that you can at least do small tweaks on your own (like me just adding the “title” variable and some parentheses to the snippet @eloise_freya posted earlier).


this one works. thanks a lot and for the tip :slight_smile: