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:
ARTISTfield contains multiple artists separated by slashes, e.g.
Artist1/Artist2/Artist3/Artist4 - Desired output:
ARTISTfield should keep only the first artist (e.g.Artist1)TITLEfield 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), thenTITLEis appended with(feat. Artist2)(no ampersand)
- Use commas to separate all featured artists except the last one, which is joined by
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:
%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:
^([^/]+).*
- Replace with:
$1
3. Extract all remaining artists (except the first) into a temporary field TMP_FEAT
- Action: Format tag field
- Field:
TMP_FEAT - Format string:
$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:
$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:
%TITLE%$if(%TMP_FEAT%, (feat. %TMP_FEAT%),)
6. (Optional) Remove the temporary field TMP_FEAT after processing
- Action: Remove tag field
- Field:
TMP_FEAT
