/
(?(DEFINE)
(?<varchar> [[:alnum:]] | [-_] )
(?<funcname> [[:alpha:]](?&varchar)* )
(?<varname> \$(?&funcname) )
(?<typepart> [[:alpha:][[:alnum:]]*)
(?<typename> \[ (?&typepart) ( \.(?&typepart) )* \] )
(?<arg> (?&typename)? \s* (?&varname) )
(?<arglist> (?&arg) ( \s*,\s* (?&arg) )* )
(?<args> ( \( (?&arglist)? \) )? )
(?<func_decl> ^ \s* function \s+ (?&funcname) \s* (?&args) \s* \{ )
)
(?&func_decl)
/
gxm