Multiple Pattern Matching Problem