Return the platform name based on the prompt matching.

def platform(self, with_prompt, platforms=None):
        """Return the platform name based on the prompt matching."""
        if platforms is None:
            platforms = self._dict['generic']['prompt_detection']

        for platform in platforms:
            pattern = self.pattern(platform, 'prompt')
            result = re.search(pattern, with_prompt)
            if result:
                return platform
        return None