quoted_values = re.sub('([a-zA-Z0-9]+)', '"\\1"', orig_text)
assignments_removed = re.sub('("[a-zA-Z0-9]+?"\\s?=\\s*)', '', quoted_values)
print(ast.literal_eval(assignments_removed))
How to fix the regexp to match my string