It looks like as you want to reduce a multi-value tag-field GENRE to a standard single-value tag-field GENRE, while keeping the first value item from the multi-value tag-field GENRE.
You can try this ...
Converter: "Tag - Tag" or Action: "Format value"
Field: GENRE
Format string: $regexp($meta_sep(GENRE,';'),'^(.+?);.*$','$1\\')
... or simpler ...
Format string: $meta(GENRE,0)'\\'
From:
(multi-value)
GENRE=Folk Rock
GENRE=Another
GENRE=A Third
To:
(single-value)
GENRE=Folk Rock
May as well throw another out then. My publisher field doesn't appear to be a multi-value tag-field like my genre field was in the original post. My publisher field has multiple publisher's as well, yet in a single value, and I'd like to cut that down to the first one listed. Since we're not dealing with multi-value tag-fields, I need a different approach.
So, example layout of my publisher field:
Columbia; Columbia Records; A Third; A Fourth
So, each entry is separated by a semicolon.
I'd like the results to look like:
Columbia
So once again, I'd like to cut all text to the right of the semicolon, along with that semicolon.
I have a two step action, one to remove all text to the right of the semicolon, and another after that to actually just replace the semicolon with nothing:
Have a closer look to the content of the tag-field:
each entry is separated by a string of one semicolon plus one space.
There are several ways to reach the goal.
You may use the proposal no. 1 from post #2.
Converter: "Tag - Tag" or Action: "Format value"
Field: PUBLISHER
Format string: $regexp($meta_sep(PUBLISHER,';'),'^(.+?);.*$','$1\\')
You may use the regexp part only of proposal no. 1.
$regexp(%PUBLISHER%,'^(.+?);.*$','$1')
... or ...
$regexp(%PUBLISHER%,'^(.+?)(?:;\s*.+$|$)','$1')
You may use a two step actions group.
Action: Split field by separator
Field: PUBLISHER
Separator: ;
Note: there is one semicolon only, there is no need to specify the space too.
Note: surrounding spaces will be trimmed automatically.
Action: Format value
Field: PUBLISHER
Format string: $meta(PUBLISHER,0)'\\'
Last thing, is there any documentation that describes how this code is put together? The Mp3tag site doesn't go into a lot of depth, and I'd like to know how to do that instead of asking for a copy/paste solution on these forums.
Probably another silly question, but you've been great!