使用 matcher.group()

Pattern pattern = Pattern.compile("[\\*0-9\\.:]+");
Matcher matcher = pattern.matcher("【华夏银行】您的华夏卡(**6999),05月29日11:03到账人民币0.34元,银联代付,余额12.86元");
while (matcher.find()) {
    String group = matcher.group();
    System.out.println(group);
}

使用 mathcer.replaceAll()

Pattern compile = Pattern.compile("[^\\d\\.:]+");
Matcher matcher = compile.matcher("【华夏银行】您的华夏卡(**6999),05月29日11:03到账人民币0.34元,银联代付,余额12.86元");
String s = matcher.replaceAll(" ");
System.out.println(s);

使用 string.split()

String content = "【华夏银行】您的华夏卡(**6999),05月29日11:03到账人民币0.34元,银联代付,余额12.86元";
String[] strings = content.split("[^\\d\\.:]+");
System.out.println(strings);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2021-10-20
  • 2021-11-29
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-05
  • 2021-07-13
  • 2021-11-06
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案