Given an alphabet A, a pattern p is a word v1@ ⋯ @vm, where vi ∈ A* and @ ∉ A is a distinguished symbol called a variable length don't care symbol. Pattern p matches a text t ∈ A* if t = u0v1u1 ⋯ um - 1vmum for some u0, ⋯ , um ∈ A*. We address the following problem: given a set P of patterns and a text t, test whether one of the patterns of P matches t. We describe an algorithm that solves the problem in time O((|t| + |P|)log |P|). In contrast to most of the existing string matching algorithms (such as that of Aho-Corasick) our algorithm is not composed of two successive stages - preprocessing the pattern (resp. the text) and reading through the text (resp. the pattern) - but has these two stages essentially interleaved. Our approach is based on using the DAWG (Directed Acyclic Word Graph), a data structure studied by A. Blumer J. Blumer, Haussler, Ehrenfeucht, Crochemore, Chen, Seiferas.