'Replace each node with the appropriate statement.
The first node is replaced with the first statement. If that
statement is a string then the string directly replaces the <var>.
Same goes for the second, cloned, node.'

def filter_var(self, match, var_node):

    cloned_var = self._get_cloned_var(var_node)
    first_str_match = _STRING_RE.match(match.group(2))
    second_str_match = _STRING_RE.match(match.group(3))
    if first_str_match:
        _replace_node(var_node, first_str_match.group(1))
    else:
        var_node.text = match.group(2).strip()
    if second_str_match:
        _replace_node(cloned_var, second_str_match.group(1))
    else:
        cloned_var.text = match.group(3).strip()
    return True
