foreachthe literal text foreach (case sensitive) .*?any character (except for line terminators), repeated any number of times
asthe literal text as (case sensitive) Non-Capturing Group(?:\s*(\$[a-z_][a-z_0-9]+)\W.*=>)? ?repeats the group contents below at most once:
\s*any whitespace character, repeated any number of times
Group 1(\$[a-z_][a-z_0-9]+) \$the literal $ (3610 / 448 / 2416)
a-zone character from a (9710) to z (12210) (case sensitive)
_the literal _ (9510 / 1378 / 5F16)
Character Class[a-z_0-9]+ +matches at least one character from the set below:
a-zone character from a (9710) to z (12210) (case sensitive)
_the literal _ (9510 / 1378 / 5F16)
0-9one character from 0 (4810) to 9 (5710)
\Wany non-word character
.*any character (except for line terminators), repeated any number of times
Non-Capturing Group(?:\s*(\$[a-z_][a-z_0-9]+)\W) \s*any whitespace character, repeated any number of times
Group 2(\$[a-z_][a-z_0-9]+) \$the literal $ (3610 / 448 / 2416)
a-zone character from a (9710) to z (12210) (case sensitive)
_the literal _ (9510 / 1378 / 5F16)
Character Class[a-z_0-9]+ +matches at least one character from the set below:
a-zone character from a (9710) to z (12210) (case sensitive)
_the literal _ (9510 / 1378 / 5F16)
0-9one character from 0 (4810) to 9 (5710)
\Wany non-word character
.*any character (except for line terminators), repeated any number of times
\na line-feed (newline) character (ASCII 10)
+matches at least one character from the set below:
\na line-feed (newline) character (ASCII 10)
\sany whitespace character
Group 3(\/\/.*[\n][\n\s]*)? ?repeats the group contents below at most once:
\/the literal / (4710 / 578 / 2F16)
\/the literal / (4710 / 578 / 2F16)
.*any character (except for line terminators), repeated any number of times
\na line-feed (newline) character (ASCII 10)
*matches any number of characters from the set below:
\na line-feed (newline) character (ASCII 10)
\sany whitespace character
Negative Lookahead(?!.*(?:\/\*)|(?:\?>)|(?:<\?)) 1st Alternative.*(?:\/\*) .*any character (except for line terminators), repeated any number of times
Non-Capturing Group(?:\/\*) \/the literal / (4710 / 578 / 2F16)
\*the literal * (4210 / 528 / 2A16)
Non-Capturing Group(?:\?>) \?the literal ? (6310 / 778 / 3F16)
>the literal > (6210 / 768 / 3E16)
Non-Capturing Group(?:<\?) <the literal < (6010 / 748 / 3C16)
\?the literal ? (6310 / 778 / 3F16)
Negative Lookahead(?!.*(?:\1|\2)\W) .*any character (except for line terminators), repeated any number of times
Non-Capturing Group(?:\1|\2) \1the text saved by group 1
\2the text saved by group 2
\Wany non-word character
.*any character (except for line terminators), repeated any number of times
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