^start of line
\s*any whitespace character, repeated any number of times
Group 2(vec4|vec3|vec2|float|int|void) vec4the literal text vec4 (case sensitive) vec3the literal text vec3 (case sensitive) vec2the literal text vec2 (case sensitive) floatthe literal text float (case sensitive) intthe literal text int (case sensitive) voidthe literal text void (case sensitive) .*?any character (except for line terminators), repeated any number of times
{the literal { (12310 / 1738 / 7B16)
*?matches any number of characters from the set below:
\sany whitespace character
\Sany non-whitespace character
^start of line
\1the text saved by group 1
}the literal } (12510 / 1758 / 7D16)
\s*any whitespace character, repeated any number of times
$end of line
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