新手求助。我想在日期中(2014-07-20)取出日,用了正则表达式,不知道错在哪...

  Pattern p=Pattern.compile("(\\d{4})-(\\d{1,2})-(\\d{1,2})");  
    Matcher m=p.matcher(disableTime);  

               int disableDay = 0;
                while(m.find())
                {
                    disableDay=Integer.parseInt(m.group(3)); 

                }

上面的disableTime是2014-07-20

为什么m.find()是false

(\d{4})-(\d{2})-(\d{2})