Document.byComment

auto byComment(string text)

A lazy range of the comments with this text (whitespace at the ends ignored)

Document doc = "<div><!-- hello --><p></p></div>";
Node c = doc.byComment("hello").front;
assert(c.nextSibling.localName == "p");