def registry_record_matches(registry_record_str, registry, repository):
    """

    :param registry_record_str: the string with optional wildcard to match against a the registry/repository combo
    :param registry: the registry to match against
    :param repository: the repository to match against
    :return: bool true if a match, false if not
    """

    return (registry_record_str[-1] == '*' and '{}/{}'.format(registry, repository).startswith(registry_record_str[:-1])) or ('/' in registry_record_str and registry_record_str == '{}/{}'.format(registry, repository)) or (registry_record_str == registry)