import re


def endswith_version(string):
    """
    check whether a string ends with a version

    :param string: the string to check
    :return: bool whether the string ends with a version
    """
    version_ending_pattern = re.compile('\S*v(?:\d+\.)?(?:\d+\.)?(\*|\d+)$')
    if version_ending_pattern.match(string.rstrip('/')):
        return True
    return False