(?m)applies the following effective flags to the remainder of the pattern: gm m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string
\s*a Unicode whitespace character, repeated any number of times
'the literal ' (3910 / 478 / 2716)
\s*a Unicode whitespace character, repeated any number of times
.*?any Unicode character (except for line terminators), repeated any number of times
\s*a Unicode whitespace character, repeated any number of times
'the literal ' (3910 / 478 / 2716)
\s*a Unicode whitespace character, repeated any number of times
Non-Capturing Group(?:,\s*|$) ,the literal , (4410 / 548 / 2C16)
\s*a Unicode whitespace character, repeated any number of times
g modifier: global. Finds all matches instead of stopping after the first
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string