[英]String replaceAll hyphen not working java 8
String test = "Vol. 5 −";
test = test.replaceAll("\u2014", "");
test = test.replaceAll("//-", "");
test = test.replaceAll("-","");
System.out.println(test);
在所有可能的输出中仍获得“ Vol。5-”
String test = "Vol. 5 −";
test = test.replaceAll("\u2212", "");
System.out.println(test);
工作正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.