I am not sure if I fully understand your question. The node used for the substructure search does only accept a search molecule with clearly defined atoms, i.e., those in the periodic table. Markush structures as such are not supported.
The substructure search will return a molecule as positive hit if it contains the search fragment, irregardless of additional functional groups attached to the found substructure in the molecule.
It would be good if you could give me a concrete example.