Abstract. This paper studies pattern detection of Web documents with the same type of contents using pattern languages. The pattern detection problem of the documents is to find a descriptive regular pattern of input strings such that successive variables do not appear in the pattern. Our pattern detection approach is to find a set of substrings of input strings instead of to detect a pattern of the strings directly. The set is called a component set. It divides each input string into colored regions and non-colored regions. This paper proposes an algorithm to generate a pattern from the two regions. Under this approach, the pattern detection problem is replaced as the problem that is to find a component set. 1