(?m)applies the following effective flags to the remainder of the pattern: gmx m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string
^start of line
\h*any horizontal whitespace character, repeated any number of times
\#the literal # (3510 / 438 / 2316)
Atomic Group(?>cs|comments-start) csthe literal text cs (case sensitive) 2nd Alternativecomments-start comments-startthe literal text comments-start (case sensitive) \ban ASCII word boundary
Comment: start of comment block
Group with flags gmxsU(?sU:(?>(?&CommentBlock)|.)*) s modifier: single line. Allows a dot to match line terminators
U modifier: Ungreedy. Quantifiers are lazy by default. A trailing ? makes a quantifier greedy
Atomic Group(?>(?&CommentBlock)|.)* *repeats the group contents below any number of times:
1st Alternative(?&CommentBlock) (?&CommentBlock)calls group CommentBlock as a subroutine
Comment: content of comment block (could be nested)
^start of line
\h*any horizontal whitespace character, repeated any number of times
\#the literal # (3510 / 438 / 2316)
Atomic Group(?>ce|comments-end) cethe literal text ce (case sensitive) 2nd Alternativecomments-end comments-endthe literal text comments-end (case sensitive) \ban ASCII word boundary
.*any character (except for line terminators), repeated any number of times
\Ra newline sequence
Comment: end of comment block