import re


def getPubChemCAS(compound):
    """Get CAS identifier for PubChem compound synonyms"""
    synonyms = compound.synonyms
    if synonyms:
        for syn in synonyms:
            match = re.match("(\d{1,7}-\d{1,2}-\d)", syn)
            if match:
                cas = match.group(1)
                return cas