Given a piece of text, I want to exclude <!-- text parts --> when searching a template. Is there a ready-to-use, nice, canonical method for it?

--
BinĂ¡ris