@Test public void regex() { Pattern pattern = AntStyleWildcardUtil.regex("**/*Test.???"); assertTrue(pattern.matcher("/more/and/more/somethingTest.xml").matches()); assertTrue(pattern.matcher("test/1Test.111").matches()); assertTrue(pattern.matcher("brian/SomethingTest....").matches()); assertTrue(pattern.matcher("a/testTest.cvs").matches()); assertTrue(pattern.matcher("something/Test.xml").matches()); assertFalse(pattern.matcher("/testTest.cvs").matches()); assertFalse(pattern.matcher("aTest.xml").matches()); assertFalse(pattern.matcher("something/aTest.xmld").matches()); assertFalse(pattern.matcher("something/aTest.xm").matches()); assertFalse(pattern.matcher("/testTestXcvs").matches()); }
public static Pattern regex(String anyStyleWildcard) { return Pattern.compile(regexString(anyStyleWildcard)); }
AntStyleWildcardUtil { public static Pattern regex(String anyStyleWildcard) { return Pattern.compile(regexString(anyStyleWildcard)); } }
AntStyleWildcardUtil { public static Pattern regex(String anyStyleWildcard) { return Pattern.compile(regexString(anyStyleWildcard)); } private  AntStyleWildcardUtil(); }
AntStyleWildcardUtil { public static Pattern regex(String anyStyleWildcard) { return Pattern.compile(regexString(anyStyleWildcard)); } private  AntStyleWildcardUtil(); static String regexString(String antStyleWildcard); static Pattern regex(String anyStyleWildcard); }
AntStyleWildcardUtil { public static Pattern regex(String anyStyleWildcard) { return Pattern.compile(regexString(anyStyleWildcard)); } private  AntStyleWildcardUtil(); static String regexString(String antStyleWildcard); static Pattern regex(String anyStyleWildcard);  }