public static function fromHex(string $hex): Uuid
    {
        $clean = strtolower($hex);

        if (!preg_match(static::UUID_HEX, $clean, $matches)) {
            $message = sprintf('Invalid UUID hex: %s', $hex);
            throw new DomainException($message);
        }

        $timeLow = $matches[1];
        $timeMid = $matches[2];
        $timeHiAndVersion = $matches[3];
        $clockSeqHiAndReserved = $matches[4];
        $clockSeqLow = $matches[5];
        $node = $matches[6];

        return new static($timeLow, $timeMid, $timeHiAndVersion, $clockSeqHiAndReserved, $clockSeqLow, $node);
    }