📅  最后修改于: 2022-03-11 14:52:42.498000             🧑  作者: Mango
public static String removeNonDigits(final String str) {
if (str == null || str.length() == 0) {
return "";
}
return str.replaceAll("/[^0-9]/g", "");
}