Yeah i can do that, although the current regex would either way never match valid syntax, if there is a $.
/$function () {/
or
/$function () use () {/
or
/$function name () {/