functionthe literal text function (case sensitive) \s+any whitespace character, repeated at least once
Group functionName(?<functionName>\w+) \w+any word character, repeated at least once
\s*any whitespace character, repeated any number of times
\(the literal ( (4010 / 508 / 2816)
Group functionArguments(?<functionArguments>(?:[^()]+)*)? ?repeats the group contents below at most once:
Non-Capturing Group(?:[^()]+)* *repeats the group contents below any number of times:
Negated Character Class[^()]+ +matches at least one character outside the set below:
(the literal ( (4010 / 508 / 2816)
)the literal ) (4110 / 518 / 2916)
\s*any whitespace character, repeated any number of times
\)the literal ) (4110 / 518 / 2916)
\s*any whitespace character, repeated any number of times
Group functionBody(?<functionBody>{(?:[^{}]+|(?-1))*+}) {the literal { (12310 / 1738 / 7B16)
Non-Capturing Group(?:[^{}]+|(?-1))*+ *+repeats the group contents below any number of times:
Negated Character Class[^{}]+ +matches at least one character outside the set below:
{the literal { (12310 / 1738 / 7B16)
}the literal } (12510 / 1758 / 7D16)
(?-1)calls group 3 as a subroutine
}the literal } (12510 / 1758 / 7D16)
g modifier: global. Finds all matches instead of stopping after the first