def getfunctions(str1, punctuation):
    """returns the functions() that are in a string, while ignoring the trailing 
    punctuation in the given parameter"""
    punctuation = punctuation.replace("(", "").replace(")", "")
    return [word.rstrip(punctuation) for word in str1.split() if word.rstrip(punctuation).endswith("()")]