I wrote a unit test to help me understand Pattern.quote and for the life of me can't figure out why this test isn't passing.
@Test
public void testRegexEscape() throws Exception {
String text = "Test";
String patternString = "es";
String quoted = Pattern.quote(patternString);
Pattern pattern = Pattern.compile(quoted);
Matcher matcher = pattern.matcher(text);
assertTrue(matcher.matches());
}