Simple Pattern Matcher for Java
- Matches a
?for any single character - Matches an
*for one or more characters
SimpleMatch.match("a*","abcd");orSimpleMatch m = new SimpleMatch("a*", "abcdefg");and callm.match();
- It will either return
trueorfalseor throw anIllegalArgumentException IllegalArgumentExceptionoccurs if any parameter isnullorlength==0- Always false on
pattern length > string length