(?s)applies the following effective flags to the remainder of the pattern: gms s modifier: single line. Allows a dot to match line terminators
\Astart of string
.*any character, repeated any number of times
Group 1(var vpart=".*?";var pn) var vpart="the literal text var vpart=" (case sensitive) .*?any character, repeated any number of times
";var pnthe literal text ";var pn (case sensitive) .*any character, repeated any number of times
Group 2(var endpart=".*?";var mn) var endpart="the literal text var endpart=" (case sensitive) .*?any character, repeated any number of times
";var mnthe literal text ";var mn (case sensitive) .*any character, repeated any number of times
\Zend of string, or before its final line terminator
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