A Fast Algorithm for Multi-pattern Searching