\Bnot an ASCII word boundary
@the literal @ (6410 / 1008 / 4016)
\w+any word character, repeated at least once
\(the literal ( (4010 / 508 / 2816)
'the literal ' (3910 / 478 / 2716)
+matches at least one character from the set below:
\wany word character
+the literal + (4310 / 538 / 2B16)
\sany whitespace character
\s+any whitespace character, repeated at least once
Condition(?(?='(?=(\w+\)|\w+\()))
'[\w\)\(]+'
|('\w+'|\$\w+)
) Uses the first branch if the lookaround matches
Positive Lookahead(?='(?=(\w+\)|\w+\())) 'the literal ' (3910 / 478 / 2716)
Positive Lookahead(?=(\w+\)|\w+\()) \w+any word character, repeated at least once
\)the literal ) (4110 / 518 / 2916)
\w+any word character, repeated at least once
\(the literal ( (4010 / 508 / 2816)
If the condition is true, match this branch:
'[\w\)\(]+'
+matches at least one character from the set below:
\wany word character
\)the literal ) (4110 / 518 / 2916)
\(the literal ( (4010 / 508 / 2816)
Otherwise, match this branch:('\w+'|\$\w+)
'the literal ' (3910 / 478 / 2716)
\w+any word character, repeated at least once
'the literal ' (3910 / 478 / 2716)
\$the literal $ (3610 / 448 / 2416)
\w+any word character, repeated at least once
\)the literal ) (4110 / 518 / 2916)
x modifier: extended. Ignores unescaped whitespace and comments outside character classes
g modifier: global. Finds all matches instead of stopping after the first