title: How to replace key string in dictionary with Python and regex?
body: <p>How to replace a key string extracting data from it using regex with Python, example : </p>
  
  <pre><code>{"root['toto']": {'new_value': 'abcdef', 'old_value': 'ghijk'}}
  </code></pre>
  
  <p>I'd like to replace <code>root['toto']</code> with something easier to read, like <code>toto</code> and my object might have several key like this, that I'd like to extract inside <code>root['']</code>.</p>