Use RegExp to parse function declarations.