# Move ft. artist to title

**URL:** https://community.mp3tag.de/t/move-ft-artist-to-title/19623
**Category:** Support
**Created:** [December 24, 2017, 4:10am UTC](https://community.mp3tag.de/t/move-ft-artist-to-title/19623 "2017-12-24T04:10:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![scoopeezy](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@scoopeezy](https://community.mp3tag.de/u/scoopeezy)
#### Post date: [December 24, 2017, 4:10am UTC](https://community.mp3tag.de/t/move-ft-artist-to-title/19623/1 "2017-12-24T04:10:18Z")

</div>

Not sure why the [Regular Expression sticky](https://community.mp3tag.de/t/521/1) is locked for further contribution..but I figured I'd share an action group that I created to move featured artist information from the Artist or AlbumArtist tag to the Title tag.

It was a bit trickier than I thought. I found a caveat with MP3Tag's "$regexp()" scripting function, where--if there is no match--then it defaults to replacing the selected format field with the [regexp string "x"](https://docs.mp3tag.de/scripting/#string-functions). So I needed to add a little more logic to work this out.

```
Action Group: Fix ft. artist - Format the Title from Artist or AlbumArtist

# Check if a test regexp replace on Title from Artist featured artist match yields a diff result than = AlbumArtist, and proceed with replace. Else, if it's the same, then this means that the match failed and just keep the same Title.
Action: Format Value
Field: TITLE
$if($eql($regexp(%artist%,(?i:featuring|feat|ft|,|\s?/|\sx\s),$char(0)),%artist%),%title%,$regexp(%artist%,(.+?)((?i:featuring|feat|ft)\.?\s+?|,\s?|\s?/\s?|\sx\s)(.+),%title% '(ft. $3)'))

# Check if a test regexp replace on Title from AlbumArtist featured artist match yields a diff result than = AlbumArtist, and proceed with replace. Else, if it's the same, then this means that the match failed and just keep the same Title.
Action: Format Value
Field: TITLE
$if($eql(%artist%,%albumartist%),%title%,$if($eql($regexp(%albumartist%,(?i:featuring|feat|ft|,|\s?/|\sx\s),$char(0)),%albumartist%),%title%,$regexp(%albumartist%,(.+?)((?i:featuring|feat|ft)\.?\s+?|,\s?|\s?/\s?|\sx\s)(.+),%title% '(ft. $3)')))

# Clean Artist tag
Action: Format Value
Field: ARTIST
$regexp(%artist%,(.+?)(\(?(?i:featuring|feat|ft)\.?\s+?|,\s?|\s?/|\sx\)?)(.+),$1)

# Clean AlbumArtist tag
Action: Format Value
Field: ALBUMARTIST
$regexp(%albumartist%,(.+?)(\(?(?i:featuring|feat|ft)\.?\s+?|,\s?|\s?/|\sx\)?)(.+),$1)

# Trim after all done (cannot do this on $1 in the expressions above for some reason)
Action: Format Value
Field: ARTIST
$trim(%artist%)

Action: Format Value
Field: ALBUMARTIST
$trim(%albumartist%)

```

Hope this helps someone else out there!

---

<div class="post-metadata">

### Author: ![scoopeezy](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@scoopeezy](https://community.mp3tag.de/u/scoopeezy)
#### Post date: [December 24, 2017, 4:16am UTC](https://community.mp3tag.de/t/move-ft-artist-to-title/19623/2 "2017-12-24T04:16:44Z")

</div>

Also, you might find that there is extra space or closing parenthesis in the Title when you are done.  
I wasn't able to modify the original format expressions to deal with this.  
Here is another action group to clean that up.

```
Action Group: Clean title

Field: TITLE
Action: Format
$trim(%title%)

Field: TITLE
Action: Replace with Regular Expression
Replace: ((\)|\s)){2,}
Replace with: $1
```

---

<div class="post-metadata">

### Author: ![scoopeezy](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@scoopeezy](https://community.mp3tag.de/u/scoopeezy)
#### Post date: [December 24, 2017, 4:36am UTC](https://community.mp3tag.de/t/move-ft-artist-to-title/19623/3 "2017-12-24T04:36:45Z")

</div>

Oh, one more thing to mention-

This matches commas "," as a featured artist. So if you have "Doors, The" or "Sheeran, Ed" then you will get some bad results.

Be sure to check this first or change the format expression if you don't want that.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [April 9, 2018, 12:57pm UTC](https://community.mp3tag.de/t/move-ft-artist-to-title/19623/4 "2018-04-09T12:57:26Z")

</div>

5 posts were split to a new topic: [Remove newline / linebreak characters from tag fields](https://community.mp3tag.de/t/remove-newline-linebreak-characters-from-tag-fields/41380)

---

<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: [February 9, 2026, 12:27pm UTC](https://community.mp3tag.de/t/move-ft-artist-to-title/19623/5 "2026-02-09T12:27:09Z")

</div>


