\w+any word character, repeated at least once
Group stat(?<stat>\w+(?:%\w+)*) \w+any word character, repeated at least once
Non-Capturing Group(?:%\w+)* *repeats the group contents below any number of times:
%the literal % (3710 / 458 / 2516)
\w+any word character, repeated at least once
Non-Capturing Group(?: : (?<sub>\w+))? ?repeats the group contents below at most once:
\w+any word character, repeated at least once
\|the literal | (12410 / 1748 / 7C16)
Comment: a "THEN" part that doesn't have a nested conditional statement
Group then(?<then>[^{|@]*+ (?: {(?!@) [^{|@]* | @(?!}) [^{|@]* )*+ ) Negated Character Class[^{|@]*+ *+matches any number of characters outside the set below:
{the literal { (12310 / 1738 / 7B16)
|the literal | (12410 / 1748 / 7C16)
@the literal @ (6410 / 1008 / 4016)
Non-Capturing Group(?: {(?!@) [^{|@]* | @(?!}) [^{|@]* )*+ *+repeats the group contents below any number of times:
1st Alternative {(?!@) [^{|@]* @the literal @ (6410 / 1008 / 4016)
Negated Character Class[^{|@]* *matches any number of characters outside the set below:
{the literal { (12310 / 1738 / 7B16)
|the literal | (12410 / 1748 / 7C16)
@the literal @ (6410 / 1008 / 4016)
2nd Alternative @(?!}) [^{|@]* }the literal } (12510 / 1758 / 7D16)
Negated Character Class[^{|@]* *matches any number of characters outside the set below:
{the literal { (12310 / 1738 / 7B16)
|the literal | (12410 / 1748 / 7C16)
@the literal @ (6410 / 1008 / 4016)
Comment: optional "ELSE" part (the content is similar to the "THEN" part)
Non-Capturing Group(?: \| (?<else> \g<then> ) )? ?repeats the group contents below at most once:
\|the literal | (12410 / 1748 / 7C16)
Group else(?<else> \g<then> ) \g<then>calls group then as a subroutine
(*SKIP)acts like (*PRUNE), but the next unanchored match attempt starts where (*SKIP) was reached instead of at the next subject character
x modifier: extended. Ignores unescaped whitespace and comments outside character classes