Positive Lookbehind(?<=\btypedef\s+enum\s*{[^}]*) \ban ASCII word boundary
typedefthe literal text typedef (case sensitive) \s+any whitespace character, repeated at least once
enumthe literal text enum (case sensitive) \s*any whitespace character, repeated any number of times
{the literal { (12310 / 1738 / 7B16)
Negated Character Class[^}]* *matches any number of characters outside the set below:
}the literal } (12510 / 1758 / 7D16)
\w+any word character, repeated at least once
\s*any whitespace character, repeated any number of times
=the literal = (6110 / 758 / 3D16)
\s*any whitespace character, repeated any number of times
\w+any word character, repeated at least once
Positive Lookahead(?=[^}]*}\s*foo_t\b) Negated Character Class[^}]* *matches any number of characters outside the set below:
}the literal } (12510 / 1758 / 7D16)
}the literal } (12510 / 1758 / 7D16)
\s*any whitespace character, repeated any number of times
foo_tthe literal text foo_t (case sensitive) \ban ASCII word boundary
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