MC lacks global substitution, so you have to do this manually by adding as many statements as you have items. For example, this handles your three-item list. Add more by duplicating the last ifelse line and incrementing the count/index numbers (in red):
listbuild(1, ;/ ,
ifelse(compare(listcount([comment]), >,
0), listitem(listitem([comment],
0), 0, / /()),
ifelse(compare(listcount([comment]), >,
1), listitem(listitem([comment],
1), 0, / /()),
ifelse(compare(listcount([comment]), >,
2), listitem(listitem([comment],
2), 0, / /())
)
One of the reasons I wrote
pscriptor is that I wanted to provide a means to do this much more simply and powerfully. The limitations in the MC expression language sometimes become too great. This expression supplied to pscriptor does what you want for any number of items:
s/ \([^)]+\)//g
Example output (data is in the Comment field):
in(comment): 'Peregrine Took (nose flute); Lucy Honeychurch (piano); Sam I-am (ham trombone)'
new(comment): 'Peregrine Took; Lucy Honeychurch; Sam I-am'