# Artist1/Artist2 should become Artist1 - Song title (feat. Artist 2)

**URL:** https://community.mp3tag.de/t/artist1-artist2-should-become-artist1-song-title-feat-artist-2/68982
**Category:** Support
**Created:** [June 29, 2025, 5:09pm UTC](https://community.mp3tag.de/t/artist1-artist2-should-become-artist1-song-title-feat-artist-2/68982 "2025-06-29T17:09:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![domimilagro](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/b77776/32.png) [@domimilagro](https://community.mp3tag.de/u/domimilagro)
#### Post date: [June 29, 2025, 5:09pm UTC](https://community.mp3tag.de/t/artist1-artist2-should-become-artist1-song-title-feat-artist-2/68982/1 "2025-06-29T17:09:38Z")

</div>

Hey, I've been using ChatGPT for about a half an hour but nothing it tells me works. Maybe you could help me 😕

I tried all the above, and what happens is it shortens ARTIST: Artist1/Artist2/Artist3 to Artist1, but in the TITLE it changes it to

"Song title (feat. REGEXP ERROR: Regular expression

Invalid preceding regular expression prior to repetition operator. The error occurred while parsing the regular expression: '^+\>\>\>HERE\>\>\> & (.+)$'.)"

Many thanks in advance! 😕

* * *

- Input: `ARTIST` field contains multiple artists separated by slashes, e.g.  
`Artist1/Artist2/Artist3/Artist4`
- Desired output:
- `ARTIST` field should keep only the **first artist** (e.g. `Artist1`)
- `TITLE` field should be appended with `(feat. Artist2, Artist3 & Artist4)`
  - Use commas to separate all featured artists except the last one, which is joined by `&`
  - If only one featured artist (e.g. `Artist1/Artist2`), then `TITLE` is appended with `(feat. Artist2)` (no ampersand)

# What I tried so far

I tried to create an Mp3tag action group with these steps:

### 1. Save original ARTIST field to a temporary tag

- Action: Format tag field
- Field: `ARTIST_ORIGINAL`
- Format string:

```auto
%ARTIST%

```

This is to keep a backup of the original list of artists, because we will modify the `ARTIST` field next.

### 2. Shorten `ARTIST` to only the first artist

- Action: Replace with regular expression
- Field: `ARTIST`
- RegEx:

```auto
^([^/]+).*

```

- Replace with:

```auto
$1

```

* * *

### 3. Extract all remaining artists (except the first) into a temporary field `TMP_FEAT`

- Action: Format tag field
- Field: `TMP_FEAT`
- Format string:

```auto
$regexp(%ARTIST_ORIGINAL%,^[^/]+/(.+)$,$1)

```

* * *

### 4. Replace slashes `/` in `TMP_FEAT` with commas and an ampersand before the last artist

I tried this to convert `/` into proper formatting like `Artist2, Artist3 & Artist4`:

- Action: Format tag field
- Field: `TMP_FEAT`
- Format string:

```auto
$replace($regexp(%TMP_FEAT%,^(.*)/(.+)$,$1 & $2),/,\,)

```

* * *

### 5. Append `(feat. TMP_FEAT)` to the TITLE field, only if `TMP_FEAT` exists

- Action: Format tag field
- Field: `TITLE`
- Format string:

```auto
%TITLE%$if(%TMP_FEAT%, (feat. %TMP_FEAT%),)

```

* * *

### 6. (Optional) Remove the temporary field `TMP_FEAT` after processing

- Action: Remove tag field
- Field: `TMP_FEAT`

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 29, 2025, 5:42pm UTC](https://community.mp3tag.de/t/artist1-artist2-should-become-artist1-song-title-feat-artist-2/68982/2 "2025-06-29T17:42:11Z")

</div>

I suggest trying your regular expressions in the 'Convert Tag -\> Tag' dialog first to see where the syntax error is.  
The result of your regular expression is immediately visible in the text between your format string and the Preview button

 ![image](https://community.mp3tag.de/uploads/default/original/3X/f/e/fe69cb0e3f0865f8c5a736fef391ec6e9efb8137.png)  
The above syntax is not valid as a Mp3tag regular expression.

You can easily adjust the syntax in this dialogue window until it works for you.  
Then you can also use the regular expression in an Action.

---

<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: [June 29, 2025, 5:51pm UTC](https://community.mp3tag.de/t/artist1-artist2-should-become-artist1-song-title-feat-artist-2/68982/3 "2025-06-29T17:51:50Z")

</div>

Try an action of the type "Guess value"  
Source format: `$regexp('Artist1/Artist2/Artist3/Artist4',(.*?)\/(.*),$1)==%title% (feat. $regexp($replace($regexp('Artist1/Artist2/Artist3/Artist4',(.*?)/(.*),$2),/,', '),'(.*), (.*)',$1 & $2))`  
Guessing pattern: %artist%==%title%

You can test the source format in Convert\>Tag-Tag which should show in the preview:  
`"Artist1==Mytitle (feat. Artist2, Artist3 & Artist4)"`

---

<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: [July 29, 2025, 5:52pm UTC](https://community.mp3tag.de/t/artist1-artist2-should-become-artist1-song-title-feat-artist-2/68982/4 "2025-07-29T17:52:42Z")

</div>

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