实例代码:

    public static void main(String[] args) {
        String str="11000.00元";
        Pattern pattern = Pattern.compile("(\\d+(\\.\\d+)?)");
        Matcher matcher = pattern.matcher(str);
        if (matcher.find()) {
            System.out.println(matcher.group(1));
        }        
    }

 

posted on 2018-08-03 10:29  一天不进步,就是退步  阅读(1031)  评论(0编辑  收藏  举报