public static Arch getArch() {
		String arch = System.getProperty("os.arch").toLowerCase(Locale.ENGLISH).replaceAll("[^a-z0-9]+", "");
		if (arch.matches("^(x8664|amd64|ia32e|em64t|x64)$")) {
			return Arch.x64;
		} else if (arch.matches("^(x8632|x86|i[3-6]86|ia32|x32)$")) {
			return Arch.x32;
		} else if (arch.matches("^(aarch64)$")) {
			return Arch.aarch64;
		} else if (arch.matches("^(arm)$")) {
			return Arch.arm;
		} else if (arch.matches("^(ppc64)$")) {
			return Arch.ppc64;
		} else if (arch.matches("^(ppc64le)$")) {
			return Arch.ppc64le;
		} else if (arch.matches("^(s390x)$")) {
			return Arch.s390x;
		} else if (arch.matches("^(arm64)$")) {
			return Arch.arm64;
		} else if (arch.matches("^(riscv64)$")) {
			return Arch.riscv64;
		} else {
			verboseMsg("Unknown Arch: " + arch);
			return Arch.unknown;
		}
	}
Java 8 approximate version of Java 11 Files.writeString()
src/main/java/dev/jbang/util/Util.java