<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _strip_prefix(self, message):
 """ Checks if the bot was called by a user. Returns the suffix if so. Prefixes include the bot's nick as well as a set symbol. """


        if not hasattr(self, "name_regex"):
            """
            regex example:
            ^(((BotA|BotB)[,:]?\s+)|%)(.+)$
            
            names = [BotA, BotB]
            prefix = %
            """

            names = self.config['names']
            prefix = self.config['prefix']

            name_regex_str = r'^(?:(?:(%s)[,:]?\s+)|%s)(.+)$' % (re.escape("|".join(names)), prefix)
            self.name_regex = re.compile(name_regex_str, re.IGNORECASE)

        search = self.name_regex.search(message)
        if search:
            return search.groups()[1]

        return None