import re


def get_sgs(goal_file):
    """Get a list of all the skel groups defined in the file, excluding the -sg and *'s."""
    with open(goal_file, "r") as f:
        text = f.read()
    # given "(defskelgroup *foo* bar", will match "bar"
    matches = re.findall(r'\(defskelgroup \*[\w-]+-sg\* ([\w-]+)', text)
    return matches