(?s)applies the following effective flags to the remainder of the pattern: gms s modifier: single line. Allows a dot to match line terminators
\\the literal \ (9210 / 1348 / 5C16)
beginthe literal text begin (case sensitive) \{the literal { (12310 / 1738 / 7B16)
Negated Character Class[^{}]* *matches any number of characters outside the set below:
{the literal { (12310 / 1738 / 7B16)
}the literal } (12510 / 1758 / 7D16)
}the literal } (12510 / 1758 / 7D16)
Non-Capturing Group(?:(?!\\(?:end|begin)).|(?R))* *repeats the group contents below any number of times:
1st Alternative(?!\\(?:end|begin)). Negative Lookahead(?!\\(?:end|begin)) \\the literal \ (9210 / 1348 / 5C16)
Non-Capturing Group(?:end|begin) endthe literal text end (case sensitive) beginthe literal text begin (case sensitive) .any character
(?R)recurses into the entire pattern
\\the literal \ (9210 / 1348 / 5C16)
endthe literal text end (case sensitive) \{the literal { (12310 / 1738 / 7B16)
Negated Character Class[^{}]* *matches any number of characters outside the set below:
{the literal { (12310 / 1738 / 7B16)
}the literal } (12510 / 1758 / 7D16)
}the literal } (12510 / 1758 / 7D16)
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