Regex is a dirty nasty business with lots of contextually overloaded operators, so it can be hard to understand. I'll try to explain a bit.
([;]?\K[\w\s]+)(?=\s\[)
Anything grouped in parenthesis is called a "capture group" so this expression has two capture groups:
([;]?\K[\w\s]+) and (?=\s\[)
The second one is easier to understand, so let's do that one first. ?= is the indicator for a "positive lookahead". In other words "you're looking for a string that must be followed by something". In this case, the something is \s\[ Positive lookaheads constrain matching, but are not included in the capture results.
\ is a special character (as many are) in regex. It can mean quote as in take the next character literally, or it can mean the exact opposite, interpret the next character as special.
\s is the regex shorthand for a space
\[ means a literal [ character
Why was something so asinine adopted? s in regex is just an s. You don't need to escape it. So if you DO escape it, it must mean something special, right? [ is a special character in regex. So if you escape it, you must mean to use it literally, obviously.
So 'tis clear as is the summer sun!
Therefore (?=\s\[) all together means "you're looking for a string that must be followed by a space and a ["
And so what about the first capture group: ([;]?\K[\w\s]+) ??
We read from left to right, so we're looking for a string that:
starts with an optional semicolon: [;]? [ ] means any character inside here, and the ? afterwards means optional. (As you've seen, ? can have other meanings depending on context.
)
\K means drop this from the capture. It's used to make the match, but not included in the match. So we're using the optional ; to make the match, but not including it in the capture.
[\w\s] means any word character (alphanumeric), followed by whitespace. The + means at least 1 but as many as available.
So this capture group means: find an arbitrarily long string of letter, numbers, and whitespace that is bounded on the left by an optional semicolon. (The semicolon must be optional because the first element in an MC list doesn't have a leading semicolon!) All other elements do, and the semicolon tells you where name 2 starts after name 1 has ended.
So in total ([;]?\K[\w\s]+)(?=\s\[) means:
Find a string of letters, numbers, and whitespace, that is bounded on the left by a semicolon if one exists, and must be followed by a space and a [ character.
Think about it in simplest terms, and that is the description of an Actor name without the role information inside the string that MC uses as a list.
Yes, the regex syntax is absurd, but did that make sense?