1 // 小数
 2 Pattern.compile("(\\d+\\.\\d+)");
 3 
 4 // 整数
 5 Pattern.compile("\\d+");
 6 
 7 
 8 Pattern pattern = Pattern.compile(规则);
 9         Matcher matcher = pattern.matcher(content);
10         if (matcher.find()) {
11             return matcher.group(0);

 

posted on 2018-04-17 18:50  Dapped_zhang  阅读(1186)  评论(0编辑  收藏  举报