Abstract: In a simple pattern matching problem one has a pattern w and a text t, which are words over a finite alphabet Σ. One may ask whether w occurs in t, and if so, where? More generally, we may have a set P of patterns and a set T of texts, where P and T are regular languages. We are interested whether any word of T begins with a word of P, ends with a word of P, has a word of P as a factor, or has a word of P as a subsequence. Thus we are interested in the languages (PΣ<sup>∗)∩</sup>T, (Σ<sup>∗P)∩</sup>T, (Σ<sup>∗</sup>PΣ<sup>∗)∩</sup>T, and (Σ<sup>∗</sup>shuP)∩T, where shu is the shuffle operation. The state complexity κ(L) of a regular language L is the number of states in the minimal deterministic finite automaton recognizing L. We derive the following upper bounds on the state complexities of our pattern-matching languages, where κ(P)≤m, and κ(T)≤n: κ((PΣ<sup>∗)∩</sup>T)≤mn; κ((Σ<sup>∗P)∩</sup>T)≤2<sup>m−1n; κ((Σ<sup><em>PΣ</em>)∩</sup>T)≤(2<sup>m−2+1)n; and κ((Σ<sup>∗shu</sup>P)∩T)≤(2<sup>m−2+1)n. We prove that these bounds are tight, and that to meet them, the alphabet must have at least two letters in the first three cases, and at least m−1 letters in the last case. We also consider the special case where P is a single word w, and obtain the following tight upper bounds: κ((wΣ<sup>∗)∩</sup>Tn)≤m+n−1; κ((Σ<sup>∗w)∩</sup>Tn)≤(m−1)n−(m−2); κ((Σ<sup><em>wΣ</em>)∩</sup>Tn)≤(m−1)n; and κ((Σ<sup>∗shu</sup>w)∩Tn)≤(m−1)n. For unary languages, we have a tight upper bound of m+n−2 in all eight of the aforementioned cases.