def getfunction(c, args, now):
    if "split" in c:
        if "ex" in c: expanding = True; 
        else: expanding = False
        if "letter" in args[c].lower() or "word" in args[c].lower() or "digit" in args[c].lower() or "number" in args[c].lower():
            how = ''
            for j in args[c].split(","):
                if "letter" in j: how = how+"([a-z])"
                elif "Letter" in j: how = how+"([a-zA-Z])"
                elif "LETTER" in j: how = how+"([A-Z])"
                elif "word" in j: how = how+"([a-z]+)"
                elif "Word" in j: how = how+"([a-zA-Z]+)"
                elif "WORD" in j: how = how+"([A-Z]+)"
                elif "digit" in j.lower(): how = how+"([0-9])"
                elif "number" in j.lower(): how = how+"([0-9]+)"
                elif "symbol" in j.lower():  how+'[^\w]+'
            now = now.str.extract(how, expand = expanding)
        else: now = now.str.split(args[c], expand = expanding)
    elif "col" in c or "loc" in c: 
        try: 
            if "le" in args[c]: now = now.str[0:-1]
            elif "ri" in args[c]: now = now.str[-1:1]
        except:
            if type(now) == pd.Series: now = now.str[args[c]]
            else: now = now[args[c]]
    elif "not" in c: now = now.str.contains(args[c]); now = reverse(now)
    elif "has" in c: now = now.str.contains(args[c])
    elif "rep" in c: 
        if "symbol" in args[c]: now = now.replace(r'[^\w]',args[c][1])
        else: now = now.str.replace(args[c][0], args[c][1])
    elif "rem" in c or "strip" in c:
        if "all" in args[c]:
            for j in [".",",","+","=","-","_","(",")","[","]","*","$","?","<",">",'"',"'","/","<",">","%"]:
                now = now.str.replace(j,"")
        elif "symbol" in args[c]: now = now.replace(r'[^\w]','')
        else: now = now.str.replace(args[c][0], "")
    elif "len" in c: 
        if args[c] == 1: now = now.str.len()
    elif "low" in c:
        if args[c] == 1: now = now.str.lower()
    elif "up" in c:
        if args[c] == 1: now = now.str.upper()
    elif "count" in c: 
        if args[c] == ".": now = now.str.count(r"(\.)")
        elif args[c] == "(": now = now.str.count(r"(\()")
        elif args[c] == ")": now = now.str.count(r"(\))")
        elif args[c] == "[": now = now.str.count(r"(\[)")
        elif args[c] == "]": now = now.str.count(r"(\])")
        elif args[c] == "{": now = now.str.count(r"(\{)")
        elif args[c] == "}": now = now.str.count(r"(\})")
        elif 'symbol' in args[c]: now = now.str.count(r'[^\w]')
        elif 'sym' in args[c]: now = now.str.count(r'[\w]')
        elif 'num' in args[c] or 'dig' in args[c]: now = now.str.count(r'[\d]')
        else: now = now.str.count(args[c]) 
    elif "df" in c or "table" in c or "series" in c: now = now.apply(pd.Series)
    return now