import re


def _validkey(key):
    """
    Validate and IUPAC InChIKey
    :param key: a string to be validated as an IUPAC InChIKey
    :return: bool
    """
    test = re.search(r'^[A-Z]{14}-[A-Z]{8}[SN][A]-[A-Z]$', key)
    if test is None:
        return False
    return True