【发布时间】:2017-10-30 20:50:45
【问题描述】:
[![While executing a command i am getting output with "" how can I supress those symbol in my output][1]][1]
[1]: https://i.stack.imgur.com/UgZDI.png
//OutputStream out = channel.getOutputStream();
out.write(3); // send CTRL-C
out.flush();
System.out.println("exit1");
if (expect.expect("$") > -1) {
System.out.println("finding $");
contt = (expect.before);
if (contt != null && contt != "") {
output=contt.replaceAll("", " ");
System.out.println("afterline"+output);
} else {
contt="Error in Top Check";
System.out.println("Error in Top check");
}
//I am trying to replaceAll this string.
//我正在通过 jsch 运行命令并获得以下输出,我已将其共享为屏幕截图。我需要通过从输出中删除“”来显示它。 需要帮助
【问题讨论】:
-
到目前为止你尝试过什么? (提示:String.replace()、Character.isISOControl(c))
-
我已经尝试使用 repalce All.no psoitive 结果
-
向我们展示您尝试过的代码 - 这将大大改善您的问题并显示您的努力 - 所以我们不会指出您已经尝试过的事情。 (“编辑”按钮是您的朋友!)
-
试着改进你的问题,否则没人能帮助你。
-
我认为您在使用 replaceAll 和引号时遇到了一些问题。检查这个:stackoverflow.com/questions/3559063/…
标签: java