public static boolean findDir(String dir, Pattern p) {
        Matcher e = Pattern.compile("^\\.{1}$").matcher(dir);
        if(e.find()) {
            File[] files = new File(dir).listFiles();
            System.out.println("root dir of files: " + Arrays.asList(files));

            for(File f : files) {
                if(f.getName().matches("\\w+\\.{1}\\w+")) {
                    System.out.println(f.getName() + ":");
                    int index = 0;
                    Matcher m = p.matcher("");
                    for(String line : new TextFile(f.getName())) {
                        m.reset(line);
                        while(m.find()) {
                            System.out.println(index++ + ": " + m.group() +
                                    ": " + m.start());
                        }
                                    
                    }
                }
                System.out.println();
            }
            return true;
        }
        return false;
    }