public static String[] splitOnSpaceWithEscape(String toSplit) {
        String[] split = toSplit.split("(?<!" + Pattern.quote("\\") + ")\\s+");
        String[] res = new String[split.length];
        for (int i = 0; i < split.length; i++) {
            res[i] = split[i].replaceAll("\\\\ "," ");
        }
        return res;
    }
Split each element of an Iterable<String> at commas.
@param input Iterable over strings.
@return An Iterable over string which breaks down each input element at comma boundaries
src/main/java/io/fabric8/maven/docker/util/EnvUtil.java