In the k-matches problem, we are given a pattern and a text, and for each text location, the desired output consists of all aligned matching characters if there are k or fewer of them, and any k aligned matching characters if there are more than k of them. This problem is one of several string matching problems that seek not only to find where the pattern matches the text, under different “match” definitions, but also to provide witnesses to the match. Other such problems include: k-aligned ones [5], k-witnesses, and k-mismatches [23]. In addition, the solutions to several other string matching problems rely on the efficient solutions of the witness finding problems. In this paper we provide a general method for solving such witness finding problems efficiently. We do so by casting the problem as a generalization of group testing, which we then solve by a process we call peeling. Using this general framework we obtain improved results for all of the above problems. We also sh...