{foreach the literal text {foreach (case insensitive) \$the literal $ (3610 / 448 / 2416)
.*any character, repeated any number of times
as the literal text as (case insensitive) Non-Capturing Group(?:\$([^ ]*)|\$(.*) => \$(.*)) \$the literal $ (3610 / 448 / 2416)
Negated Character Class[^ ]* *matches any number of characters outside the set below:
the literal (3210 / 408 / 2016)
2nd Alternative\$(.*) => \$(.*) \$the literal $ (3610 / 448 / 2416)
.*any character, repeated any number of times
\$the literal $ (3610 / 448 / 2416)
.*any character, repeated any number of times
}the literal } (12510 / 1758 / 7D16)
.*any character, repeated any number of times
{the literal { (12310 / 1738 / 7B16)
\/the literal / (4710 / 578 / 2F16)
foreach}the literal text foreach} (case insensitive) U modifier: Ungreedy. Quantifiers are lazy by default. A trailing ? makes a quantifier greedy
i modifier: insensitive. Matches without distinguishing uppercase and lowercase letters
s modifier: single line. Allows a dot to match line terminators