import re
st = (
    "'a': '1', 'b': '2.3', 'c': 'name', 'd': 229, 'e': '', 'f': '228', 'g': 12"
    )
print(re.findall("\\'\\S+?\\':\\s*\\'?(.*?)\\'?(?:,|$)", st))
python regex for extracting strings between certain two strings