title: Find bunch of Files in inside directory
body: <p>Hi I have directory which contains sub directories with names like </p>
  
  <pre><code>1-1,
  2-3,
  4-10,
  11-20
  </code></pre>
  
  <p>Now I want to find all the directories in the range say 1-10 so it should return me dirs 1-1,2-3 and 4-10. I have the following code but it not working as expected. </p>
  
  <pre><code>File files[] = folder.listFiles(new FileFilter() {
              public boolean accept(File file) {
  
                  String name = file.getName().toLowerCase();
  
                  if (name.startsWith("1-") || name.endsWith("-10"))
                      return true;
  
                  return false;
              }
          });
  </code></pre>
  
  <p>Above code gives output 1-1 and 4-10 it does not include 2-3 in combination. How do I solve this problem? Please help. Thanks in advance.</p>