String tmp = "xxxx123"
String description = Pattern.compile("[\\d]").matcher(tmp).replaceAll("");
// description = xxxx
解析:\d表示数字字符,将目标字符串中的数字字符全部替换成空串并返回新串。
String tmp = "xxxx123"
String description = Pattern.compile("[\\d]").matcher(tmp).replaceAll("");
// description = xxxx
解析:\d表示数字字符,将目标字符串中的数字字符全部替换成空串并返回新串。