def METHOD_NAME(self):
    result = ""
    if bool(self._match_pattern):
        result = self._input.METHOD_NAME(self._starting_pattern)
    else:
        result = self._input.METHOD_NAME(self._starting_pattern, self.__template_pattern)
    next = self._read_template()
    while bool(next):
        if self._match_pattern is not None:
            next += self._input.METHOD_NAME(self._match_pattern)
        else:
            next += self._input.readUntil(self.__template_pattern)
        result += next
        next = self._read_template()
    if self._until_after:
        result += self._input.readUntilAfter(self._until_after)
    return result