r.pattern = "foo";
assertFalse(r.matches("bar"));
assertFalse(r.matches("foobar"));
assertFalse(r.matches("barfoo"));
assertTrue(r.matches("foo"));
r.pattern = "fo.o";
assertFalse(r.matches("foxo"));
assertFalse(r.matches("foo"));
assertTrue(r.matches("fo.o"));