Remove unnecessary regex recursion