标签:match content replace find system code 余额 int class
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);
标签:match content replace find system code 余额 int class
原文地址:https://www.cnblogs.com/Godfunc/p/10690221.html