Commit 9bf201236cb6b78958d121aaaf614a3131512602

Authored by qianbao
2 parents 11f61c6c fce865d4

Merge remote-tracking branch 'origin/master'

src/main/java/com/xly/util/AdvancedSymbolRemover.java
@@ -28,8 +28,10 @@ public class AdvancedSymbolRemover { @@ -28,8 +28,10 @@ public class AdvancedSymbolRemover {
28 text = text.replaceAll("<div>", ""); 28 text = text.replaceAll("<div>", "");
29 text = text.replaceAll("&emsp;", ""); 29 text = text.replaceAll("&emsp;", "");
30 30
31 - // 去掉数字末尾无用的 .0 .00  
32 - text = text.replaceAll("(?<=\\d)\\.0+(?!\\d)", " "); 31 + // 1. 去掉整数后面的 .000 → 变成整数
  32 + text = text.replaceAll("(?<=\\d)\\.0+(?!\\d)", "");
  33 + // 2. 去掉小数末尾多余的 0 → .8900000 → .89
  34 + text = text.replaceAll("(?<=\\.\\d)0+(?!\\d)", "");
33 35
34 // 去掉无用文字 36 // 去掉无用文字
35 text = text.replaceAll("换一换", ""); 37 text = text.replaceAll("换一换", "");