Class GlobMatcher

java.lang.Object
eu.svjatoslav.commons.string.GlobMatcher

public class GlobMatcher extends Object
GlobMatcher - class for matching strings against wildcard expressions.

 Wildcard expressions:
 * -- corresponds to any amount of characters.
 ? -- corresponds to any single character.
 
  • Constructor Details

    • GlobMatcher

      public GlobMatcher()
  • Method Details

    • match

      public static boolean match(String inputString, String wildcardExpression)
       Test input string against wildcard expression.
       * -- corresponds to any amount of characters.
       ? -- corresponds to any single character.
       
      Parameters:
      inputString - input string
      wildcardExpression - wildcard expression
      Returns:
      true if input string matches input pattern