def parse_release_header(version_line, prefix='##'):
    """Parse a version from a markdown header.

    The line must be formatted as:
    ## [v]X.Y.Z [whatever else you want]

    So you could have, for example:
    ## 1.5.0 (11/28/2018)
    ##1.5.0
    ## v1.5.0 - 11/28/2018
    ## 1.5.0 hello this is a test

    Returns:
        str: The parsed version.
    """
    if not version_line.startswith(prefix):
        return None
    version_line = version_line[len(prefix):].lstrip()
    if len(version_line) == 0:
        return None
    words = version_line.split()
    if len(words) == 0:
        return None
    version_word = words[0]
    if version_word.startswith('v'):
        version_word = version_word[1:]
    return version_word
