final public static function replaceAllDotsExceptLastTwo(string $string): string
    {
        $countDots = substr_count($string, '.');
        if ($countDots > 2) {
            $stringArray = explode('.', $string);
            $string = '';
            for ($i = 0; $i < $countDots - 2; ++$i) {
                $string .= $stringArray[$i].'_';
            }
            $string .= $stringArray[$countDots - 2].'.'.$stringArray[$countDots - 1].'.'.$stringArray[$countDots];
        }

        return $string;
    }