import re


def get_prefix(curie):
    """Get prefix from CURIE."""
    match = re.fullmatch(r'([a-zA-Z.]+):\w+', curie)
    if match is None:
        raise ValueError(f'{curie} is not a valid CURIE')
    return match[1]