As chip designs grow in complexity, the optical proximity correction (OPC) process becomes increasingly time-consuming. As a result, pattern search technology is becoming a foundation stone of many tasks for manufacturing, such as lithography simulation, hotspot detection, mask optimization, and so on. The most difficult challenge of pattern search is to locate clips by specific patterns within the layout accurately and efficiently. In this paper, we present a generalized pattern search method capable in diverse scenarios, including patterns with hollow shapes, shifting edges, and multi-layer situations. Experimental results show that our method outperforms commercial tools in pattern locating accuracy and handling search problems involving complex patterns which is not directly support by commercial tools yet.