def _pre_var(self, value):
        """
        replace predefined variables, the format is #{name}
        """

        def sub_(m):
            return self._pre_variables.get(m.group()[2:-1].strip(), '')

        return r_pre_var.sub(sub_, value)
replace predefined variables, the format is #{name}