62,629
社区成员




package test.iotest;
import java.io.File;
import java.util.regex.Matcher;
public class FilelistTest {
public static void main(String[] args) {
File forder = new File("E:\\test\\");
File[] filelist = forder.listFiles();
String[] postfixnames = new String[filelist.length];
String temppostfix = null;
Pattern p = null;
Matcher m = null;
for(int i=0; i<filelist.length; i++) {
temppostfix = filelist[i].getName();
p = Pattern.compile("(.*)\\.([0-9]{3})");
m = p.matcher(temppostfix);
while(m.find()) {
System.out.println(Integer.valueOf(m.group(2)));
}
}
}
}