private function validateStartLength($start, $length)
    {
        $_startEnd = [];
        if (preg_match('/[0-9]/', $start)) {
            $_startEnd[0] = (int) $start;
        } elseif ('#' === $start) {
            $_startEnd[0] = '#';
        } else {
            throw new \UnexpectedValueException(
                'First argument must be positive int, 0 or character #.',
                $start
            );
        }

        if (preg_match('/^[1-9]\d*/', $length)) { // only positive int without 0
            $_startEnd[1] = (int) $length - 1;
        } else {
            throw new \UnexpectedValueException(
                'Second argument must be positive int without 0.',
                $length
            );
        }

        return $_startEnd;
    }