Hi all, I noticed that \doifinstring produces quite strange output if a command follows immediately (or with any amount of spaces) after the substring I am searching for: -------------------------------------MWE \starttext \def\xxx{asdf \bf Z:\bf asdf} % strange \def\xxx{asdf \bf Z: \bf asdf} % strange \def\xxx{asdf \bf Z:: \bf asdf} % OK \def\xxx{asdf \bf Z: text \bf asdf} % OK \def\xxx{asdf \bf Z:{} \bf asdf} % OK \doifinstring{Z:}{\xxx}{yes!} \stoptext ----------------------------------OUTPUT fbf@yes! fbf@yes! yes! yes! yes! ---------------------------------------- If I insert another character, text or {} between them (with or without spaces), all is ok. I would like to ask what is the cause of this behavior and how to use the \doifinstring to prevent the "fbf@" on the output. Best wishes Tomáš