When using the edit movie card function...
You search for a movie (using TMDB-international) it will fill in all information. In the actors section, you are currently parsing the data and substituting square braces "[]" for parenthesis "()". When the actor plays multiple roles in the movie, the roles are in parenthesis with the forward slash "/" separating the roles. This is currently causing the parser to add the actor/role multiple times in the list.
I am asking that you similarly substitute the backward slash "\" for any forward slash encountered. When displayed in AMM, the various roles will display separated by the vertical bar "|" and additional actor/role sets are not created.
Check out Captain Marvel (2019) as an example.
[attachment=0]AMM - Captain Marvel.png[/attachment]