Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
Object o = stringObjectEntry.getValue();
//将信息拼凑成一个预览信息,只选取汉字和非公司名称
if (!ObjectUtils.isEmpty(o) && (p.matcher(o.toString()).find())
&& !stringObjectEntry.getKey().toString().equals("公司名称")) {
str.append(o.toString());
str.append("-");
}
判断字段中是否含有中文
最新推荐文章于 2024-04-27 17:30:34 发布