Class Wildcard


  • public class Wildcard
    extends Object
    this class is used to parse
    • Constructor Detail

      • Wildcard

        public Wildcard()
    • Method Detail

      • matches

        public static boolean matches​(@Nonnull
                                      String pattern,
                                      @Nonnull
                                      String text)
        matches a string to pattern where * can be 0-n unknown characters and ? can be exactly 1 character
         
         Wildcard.matches("Te?t","Test") -> true
         Wildcard.matches("Te?t","Tesst") -> false
         Wildcard.matches("Te*t","Tesst") -> true
         Wildcard.matches("Te*t","Test") -> true
         Wildcard.matches("Tet","Test") -> true
         
         
        Parameters:
        pattern - the pattern to use
        text - the text to match against
        Returns: