Simple Pattern Matcher