# Trying to get this auto tag fix script to move artists to featured artists in title

**URL:** https://community.mp3tag.de/t/trying-to-get-this-auto-tag-fix-script-to-move-artists-to-featured-artists-in-title/64493
**Category:** Support
**Created:** [April 23, 2024, 7:56pm UTC](https://community.mp3tag.de/t/trying-to-get-this-auto-tag-fix-script-to-move-artists-to-featured-artists-in-title/64493 "2024-04-23T19:56:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![astuary](https://community.mp3tag.de/user_avatar/community.mp3tag.de/astuary/32/16775_2.png) [@astuary](https://community.mp3tag.de/u/astuary)
#### Post date: [April 23, 2024, 7:56pm UTC](https://community.mp3tag.de/t/trying-to-get-this-auto-tag-fix-script-to-move-artists-to-featured-artists-in-title/64493/1 "2024-04-23T19:56:46Z")

</div>

Hi, I'm trying to re tag some of my music files. I have my songs on plex, and the current artist tags have semicolons in them and that messes up the plex grouping by artist. For example artist A and artist A; B are different. So i want to rename the artists to just be the first one listed, and add the other artists in the song title with "(feat. ...)".

I had ChatGPT come up with actions for me to do the following in mp3tag and here's what it gave me.

Action 1: Format Value (for adding artists to the title if necessary)  
Action type: Format value  
Field: TITLE  
Format string: `$if($eql($strstr(%TITLE%,'(feat'),0),$ifgreater($sub($len(%ARTIST%),$len($regexp(%ARTIST%,'.*?; ',''))),%TITLE% (feat. $regexp(%ARTIST%,'.*?; (.+)$','$1')), %TITLE%))`  
This action checks if "(feat" is already in the title. If not, it adds "(feat. B, C)" based on the artists listed after the first one in the ARTIST tag.

Action 2: Format Value (for cleaning up the ARTIST tag)  
Action type: Format value  
Field: ARTIST  
Format string: $regexp(%ARTIST%,'^(.+?); (.+)$',$1)  
This action keeps only the first listed artist in the artist tag.

It can do action 2 just fine, but nothing happens with action 1. What should I change? Thanks!

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [April 23, 2024, 8:04pm UTC](https://community.mp3tag.de/t/trying-to-get-this-auto-tag-fix-script-to-move-artists-to-featured-artists-in-title/64493/2 "2024-04-23T20:04:38Z")

</div>

Instead of the 2 actions, try a single action of the type "Guess value"  
Source: `$regexp(%artist%,(.*?); (.*),'$1=='%title%' (feat. $2)')`  
Target format string: `%artist%==%title%`

---

<div class="post-metadata">

### Author: ![astuary](https://community.mp3tag.de/user_avatar/community.mp3tag.de/astuary/32/16775_2.png) [@astuary](https://community.mp3tag.de/u/astuary)
#### Post date: [April 23, 2024, 8:15pm UTC](https://community.mp3tag.de/t/trying-to-get-this-auto-tag-fix-script-to-move-artists-to-featured-artists-in-title/64493/3 "2024-04-23T20:15:24Z")

</div>

you're a life saver! works great, thank you.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [May 23, 2024, 8:16pm UTC](https://community.mp3tag.de/t/trying-to-get-this-auto-tag-fix-script-to-move-artists-to-featured-artists-in-title/64493/4 "2024-05-23T20:16:11Z")

</div>

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