[fix] Moved the creation of the RegExp back in to the function, seems to fix all the recursions #4