'Searches for matching topics or aliases based on player\'s
input.
Args:
topcistr (str): Help topic to search for.
exact (bool, optional): Require exact match
(non-case-sensitive).  If `False` (default), match
sub-parts of the string.
Returns:
matches (HelpEntries): Query results.'

def find_topicmatch(self, topicstr, exact=False):

    dbref = utils.dbref(topicstr)
    if dbref:
        return self.filter(id=dbref)
    topics = self.filter(db_key__iexact=topicstr)
    if (not topics):
        topics = self.get_by_alias(topicstr)
    if ((not topics) and (not exact)):
        topics = self.filter(db_key__istartswith=topicstr)
        if (not topics):
            topics = self.filter(db_key__icontains=topicstr)
    return topics
