The "Contains" condition for Rules can be configured with any desired query term. It should be noted, however, that this condition refers to words, not letters.
For instance, creating a Rule with "contains <d>" as a condition will check queries for the word "d," not the letter "d."
In other words, the query "a b c d" would trigger the above Rule, because it contains the word "d." The query "donuts" would not trigger this rule, because although it contains the letter "d," it does not contain the word "d" -- the "d" is part of the larger word "donuts."