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
true
orfalse
or throw anIllegalArgumentException
IllegalArgumentException
occurs if any parameter isnull
orlength==0
- Always false on
pattern length > string length