PatternMatcher { public static boolean matchWordPattern(String value, String pattern) { return matchWordPattern(value, pattern, true); } private  PatternMatcher(); static boolean matchCharDatePattern(String value, String pattern); static boolean matchWordPattern(String value, String pattern); static boolean matchWordPattern(String value, String pattern, boolean caseSensitive);  }
@Test public void matcherPatternWordNotSensitive() { Assert.assertTrue(PatternMatcher.matchWordPattern("Toronto1234", "[alnum]", false)); }
@Test public void matcherPatternWordSensitive() { Assert.assertTrue(PatternMatcher.matchWordPattern("Toronto1234", "[Word][number]")); }
@Test public void matcherPatternEmail() { Assert.assertTrue( PatternMatcher.matchWordPattern("user.lastname@talend.com", "[word].[word]@[word].[word]", false)); }
@Test public void matcherPatternSensitive() { Assert.assertTrue(PatternMatcher.matchWordPattern("user.Lastname", "[word].[Word]")); }