String matching is the primary function of signature based intrusion detection systems. We propose a novel algorithm for string matching iired by old-fashion searching in a general dictionary in which the words of this dictionary is consists of ASCII characters. We also present a scalable, high throughput, memory efficient and modular architecture for large scale string matching based on the proposed algorithm. The words of interested dictionary have been extracted from malicious patterns at Snort NIDS (2013) database. The memory efficiency of the proposed algorithms is directly proportional to the dissimilarity of patterns at the first characters. In a large dictionary, it is feasible to create several groups, when members of each group satisfy a desired condition. The presented architecture is designed for implementation on the Field Programmable Gate Array and profits from the pipeline, modular structure and suitable utilization of distributed memory resources. Due to the routing limitation of FPGAs, the maximum length of patterns has been bounded and a further solution suggested for tackling this obstacle. The post place route implementation results of a set of 11895 patterns (117832 Byte) with lengths within 2 and 20 characters show an efficiency of 1.47 Byte/Char or 0.28 for 6-input LUT/char and a maximum throughput of 2.38G. Other results for a set of 3471 patterns (104399 Byte) with lengths within 21 and 40 characters show an efficiency of 1.87Byte/Char or 0.42 for6-input LUT/char and the maximum throughput of 1.97G. Adding new string to dictionary is feasible by placing extra modules in architecture. Keywords: String matching, intrusion detection system, Field programmable gate array, modular, hardware based