r.pattern = "a,b , pdf, ";
assertTrue(r.matches("file.a"));
assertTrue(r.matches("file.b"));
assertTrue(r.matches("file.B"));
assertTrue(r.matches("file.pdf"));
assertTrue(r.matches("file.PdF"));
assertFalse(r.matches("file.a,b,c"));
assertFalse(r.matches("file.txt"));
assertFalse(r.matches("file."));
assertFalse(r.matches("file. "));
assertFalse(r.matches("file"));