import re


def is_valid_version(v):
    """ Check if a string is a valid version
    >>> is_valid_version('20180525-1202')
    True
    >>> is_valid_version('20180525')
    False
    >>> is_valid_version('201805251221')
    False
    """
    if re.match('\A\d{8}-\d{4}\Z', v):
        return True
    return False