Search for substrings in the implemented tree.