@Test public void testBasic() throws InvalidPatternException { assertTrue(WildcardGlobs.isGlobMatched("a?{ex,in}", "akin")); assertTrue(WildcardGlobs.isGlobMatched("a?{ex,in}", "alex")); assertFalse(WildcardGlobs.isGlobMatched("a?{ex,in}", "appin")); }
public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; }
WildcardGlobs { public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; } }
WildcardGlobs { public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; }  }
WildcardGlobs { public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; }  static boolean isGlobMatched(String globPattern, String targetText); static boolean isNoBraceGlobMatched(String globPattern, String target); static List<String> getGlobsAfterBraceExpansion(String pattern); static List<String> getGlobsAfterBraceExpansion(String pattern, boolean allowNumericRanges, PhraseTreatment quoteTreatment, PhraseTreatment parenthesesTreatment); }
WildcardGlobs { public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; }  static boolean isGlobMatched(String globPattern, String targetText); static boolean isNoBraceGlobMatched(String globPattern, String target); static List<String> getGlobsAfterBraceExpansion(String pattern); static List<String> getGlobsAfterBraceExpansion(String pattern, boolean allowNumericRanges, PhraseTreatment quoteTreatment, PhraseTreatment parenthesesTreatment);  }