[英]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.