String (@NotNull String fullCommandLine, @NotNull String executableName) { List<String> commandLineList = StringUtil.splitHonorQuotes(fullCommandLine, ' '); if (commandLineList.isEmpty()) return ""; String first = StringUtil.unquoteString(commandLineList.get(0)); if (StringUtil.endsWithIgnoreCase(first, executableName)) { List<String> argsList = commandLineList.subList(1, commandLineList.size()); return StringUtil.join(argsList, " "); } return ""; }