Fixed regex pattern matching in puppet mode