日期:2014-05-20 浏览次数:20983 次
Pattern p = Pattern.compile("\\d{3,5}");
String s = "123-34345-234-00";
Matcher m = p.matcher(s);
p(m.matches());
m.reset();
p(m.find());
p(m.start() + "-" + m.end());
p(m.find());
p(m.start() + "-" + m.end());
p(m.find());
p(m.start() + "-" + m.end());
p(m.find());