Pattern Scanner