def _process_string(self, value):
        processed = value

        # Process each reference in value (one by one)
        for match in self._ref_pattern.finditer(value):
            ref_conf, ref_opt = match.groups()
            val = self._load_option(ref_conf, ref_opt)

            if match.group(0) == value:
                return val
            else:
                processed = re.sub(self._ref_pattern, str(val), processed, count=1)
        return processed
Processing string (and reference links) values via regexp.
dataset/ETHPy150Open openstack/anvil/anvil/cfg.py/YamlRefLoader._process_string