Correct structure for INVOLVEDPEOPLE

A lot of tracks have values for INVOLVEDPEOPLE in a wrong structure, e.g.:

grafik

According to this: https://docs.mp3tag.de/mapping/#involvedpeople
I am looking for a way to swap the parts accordingly, this seems easy.
But if one person is involved in different roles, I would like to agggregate them via role.
I would like to get a list like:

How to split these values?
How can I sort the values according to role?

Try for single strings like "Ben Tolliday, Producer, MixingEngineer"::
$regexp($regexp(%involvedpeople%,'(.*?), (.*)',$2: $1),'(.*), (.*): (.*)',$1: $3;$2: $3)
As there is no sorting function in MP3tag, I have no suggestion for that.

I am not certain how you want to structure this field.
Do you want to have multivalue-fields of INVOLVEDPEOPLE or do you want to put the content in 1 field?

According to your citied link the structure for 1 field would have to look like:
Producer:Ben Tolliday;Composer:Lord Huron; ....

(no spaces after ":" and a ";" after each separate content.)

You know that there is an official field for COMPOSER (TCOM)?

I am looking for restructing a multivalue-field with multiple roles (e.g. 2-5) with a short action.
As stated I would like to have separate fields for every role,
seperating a multivalue is easily done,
sorting seems to be impossible. :thinking:

How looks an action that splits 2 to 5 roles per person like?

I know that there is a field COMPOSER.
This issue is to solved in a later step.

To get a single field to repeat the name, try:
$regexp($replace('ABC DEF, composer, vocals, drums',', ',:$regexp('ABC DEF, composer, vocals, drums','(.*?), (.*)',$1;)),(.*?):.*?;(.*),$2:$1)
which leads to
composer:ABC DEF;vocals:ABC DEF;drums:ABC DEF

(naturally, you have to replace the "'ABC DEF, composer, vocals, drums'" with the real field name - if you want to address the first multivalue field, this would be $meta(involvedpeople,0)