Group varname(?<varname>\$[a-z_]\w*) \$the literal $ (3610 / 448 / 2416)
a-zone character from a (9710) to z (12210) (case insensitive)
_the literal _ (9510 / 1378 / 5F16)
\w*any word character, repeated any number of times
\s*any whitespace character, repeated any number of times
\[the literal [ (9110 / 1338 / 5B16)
\s*any whitespace character, repeated any number of times
Group index(?<index>[a-z_]\w*) a-zone character from a (9710) to z (12210) (case insensitive)
_the literal _ (9510 / 1378 / 5F16)
\w*any word character, repeated any number of times
\s*any whitespace character, repeated any number of times
\]the literal ] (9310 / 1358 / 5D16)
g modifier: global. Finds all matches instead of stopping after the first
i modifier: insensitive. Matches without distinguishing uppercase and lowercase letters
x modifier: extended. Ignores unescaped whitespace and comments outside character classes