def parse_syntax(line):
    """
    >>> parse_syntax('syntax: glob')
    'glob'
    >>> parse_syntax('syntax: regexp')
    'regexp'
    >>> parse_syntax('syntax: none')
    Traceback (most recent call last):
    ...
    Exception: Unknown syntax "none"
    """
    line = line.replace(':', ' ')
    _, syntax = line.split()
    if syntax in ['glob', 'regexp']:
        return syntax
    else:
        raise Exception('Unknown syntax "%s"' % syntax)