<p>A compact character string retrieving system (1) capable of producing correctly the result of matching (205) without omission even upon occurrence of multiple matching (306) in which a plurality of search terms are matched for one character string (at 280) by a finite automaton. A destination state for transition brought about by a trailing character of the search term is newly created instead of an initial state. A transition table storage (220) stores the destination state. On the basis of the source state number and a specified pattern character code, the destination state number is read out from the state transition table storage (220). When the state number read out represents the destination state of the transition brought about by the trailing character of the specified pattern character string, an identifier thereof is outputted. The identifiers of the search terms matched are each represented by one bit information, and a group of corresponding flags is stored in one slot. Multiple matching (280) can be performed without omission. The character string retrieving system is implemented in a reduced size. <IMAGE></p>