Fixes #239, test character before function keyword

Infront of the function keyword, there may not be a valid functionname character

Added a data set for the bug and change regex