Wildcard string pattern matching class. Only '*' is interpreted as wild card
meaning the occurance of any number of arbitray characters.
This is a thread-safe immutable class.
Example: The code snippet
StringPattern pattern = new WildCardPattern("Hello*");
System.out.println(pattern.matches("Hello world!"));
System.out.println(pattern.matches("Hi Jim!"));
will produce the output
true
false
author: Franz-Josef Elmer |