The dictionary matching with gaps problem is to preprocess a dictionary D of total size |D| containing d gapped patterns P 1 , . . . , P d over an alphabet Σ, where each gapped pattern P i is a sequence of subpatterns separated by bounded sequences of don't cares. Then, given a query text T of length n over Σ, the goal is to output all locations in T in which a pattern P i ∈ D, 1 ≤ i ≤ d, ends. There is a renewed current interest in the gapped matching problem stemming from cyber security. In this paper we solve the problem where all patterns in the dictionary have one gap or a few gaps with at least α and at most β don't cares, where α and β are given parameters. Specifically, we show that the dictionary matching with a single gap problem can be solved in either O (d log d + |D|) preprocessing time and O (d log ε d + |D|) space, and query time O (n(β − α) log log d log 2 |D| + occ), where occ is the number of patterns found, or preprocessing time and space: O (d 2 + |D|), and query time O (n(β − α) + occ), where occ is the number of patterns found. We also show that the dictionary matching with k gaps problem, where k ≥ 1, can be solved in preprocessing time: O (|D| log |D|), space: O (|D| + d (c 1 log d) k k! ), and query time:O ((β − α) k (n + (c 2 log d) k k! log log |D|) + occ), where c 1 , c 2 > 1 are constants and occ is the number of patterns found. As far as we know, these are the best solutions for this setting of the problem, where many overlaps may exist in the dictionary.