hascommentfilter takes a single argument that must be a quoted string:
hascomment "Good move!"The
hascommentfilter matches a position if the PGN file contains a comment for that position which has a substring that is equal to the argument. A comment for a position in a PGN file is considered to be a comment to the move leading to that position.