public static UUID getUuid(@NonNull final String uuidHex) {
        if (uuidHex.matches(PATTERN_UUID_HEX))
            return UUID.fromString(new StringBuffer(uuidHex)
                    .insert(8, "-")
                    .insert(4, "-")
                    .insert(4, "-")
                    .insert(4, "-")
                    .toString());

        return null;
    }
Returns a type4 UUID from a uuid string without dashes

@param uuidHex Hex string
mesh/src/main/java/no/nordicsemi/android/mesh/utils/MeshParserUtils.java