java取出string中的数字

String regEx="[^0-9]";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(etCoustom.getText().toString());
 String trim = m.replaceAll("").trim();

 

posted @ 2015-09-17 16:19  百晓生  阅读(725)  评论(0编辑  收藏  举报