orig_text = (
    """key1=[subKey1=[val1,val2=[k1,k2]],val3,val4,subKey2=[aaa,bbb]],key2=val5,key3,key4=[1,2,3]"""
    )
quoted_values = re.sub('([a-zA-Z0-9]+)', '"\\1"', orig_text)
assignments_removed = re.sub('("[a-zA-Z0-9]+?"\\s?=\\s*)', '', quoted_values)
How to fix the regexp to match my string