String regEx="[^0-9]"; Pattern p = Pattern.compile(regEx); Matcher m = p.matcher(etCoustom.getText().toString()); String trim = m.replaceAll("").trim();
String regEx="[^0-9]"; Pattern p = Pattern.compile(regEx); Matcher m = p.matcher(etCoustom.getText().toString()); String trim = m.replaceAll("").trim();
转载于:https://www.cnblogs.com/itpepe/p/4816741.html