试试这个
String str = "20131210_19015.csv,a.csv,";
System.out.println(""+Pattern.matches(".*(?<=_)(\\d{4})(?=.csv).*", str));