In jdk/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java there are two regexps: String extRegex = "\\b" + EXTEQUAL + "(\"[\\p{Graph}|\\p{Blank}]+?\"|\\p{Graph}+\\b)"; String[] extList = exts.split("[\\p{Blank}|\\p{Punct}]+"); which have redundant bar-character in the char class.