Tagger script help

I would like to remove featuring artists from the album title, album artist, artist and title, and instead put that name in the “guest artist” tag. I’ve also noticed that sometimes people choose to tag featuring artists as “performer:guest”, so I’d also like for the script to work in those cases. If there’s more than one featuring artist I want to separate them with a semicolon.

I’ve tried modifying the existing plugins pertaining to feat. artist but I’m unable to make it work for more than one specific case. Any help would be greatly appreciated.

Edit:

So I’ve made some progress but I could use some help with this last part. I don’t know how to handle cases when there are 2 featuring artists. My script currently looks like this:

$if($in(%artists%,;),
$if($in(%artist%,feat.),
$set(artist,$rreplace(%artist%,\sfeat.,))
$set(artistsort,$rreplace(%artistsort%,\sfeat.
,))
$setmulti(GUEST ARTIST,$replace(%artists%,%artist%; ,))
,
$copy(artist,artists)
)
,)

And here’s an example of the artist value I’m working with:
David Guetta & Chris Willis feat. Fergie & LMFAO