从字符串中提取数字 java正则表达式

从字符串中提取数字 java正则表达式
String result = Pattern.compile("[^0-9]").matcher(su).replaceAll("").trim();
int su1=Integer.valueOf(result);

posted @ 2017-08-01 14:25  魔杰Lee  阅读(3441)  评论(0编辑  收藏  举报