def binary_regex(self):
        """Return the regex for the binary."""
        regex = {'linux': r'^%(BINARY_NAME)s-%(VERSION)s\.%(EXT)s$',
                 'linux64': r'^%(BINARY_NAME)s-%(VERSION)s\.%(EXT)s$',
                 'mac': r'^%(BINARY_NAME)s(?:\s|-)%(VERSION)s\.%(EXT)s$',
                 'mac64': r'^%(BINARY_NAME)s(?:\s|-)%(VERSION)s\.%(EXT)s$',
                 'win32':
                     r'^%(BINARY_NAME)s(%(STUB_NEW)s|(?:\sSetup\s|-)%(STUB)s%(VERSION)s)\.%(EXT)s$',
                 'win64':
                     r'^%(BINARY_NAME)s(%(STUB_NEW)s|(?:\sSetup\s|-)%(STUB)s%(VERSION)s)\.%(EXT)s$',
                 }
        return regex[self.platform] % {
            'BINARY_NAME': APPLICATIONS_TO_BINARY_NAME.get(self.application, self.application),
            'EXT': self.extension,
            'STUB': 'Stub ' if self.is_stub_installer else '',
            'STUB_NEW': ' Installer' if self.is_stub_installer else '',
            'VERSION': self.version,
        }
Return the regex for the binary.