title: Extract variable from special string format Python
body: <p>I have retrieve a string from an XML file which looks like this :</p>
  
  <pre><code>"[0, 30, -146, 0]$[-143, 30, -3, 0]" #[left, top, right, bottom]
  </code></pre>
  
  <p>(It is always the same format)</p>
  
  <p>And i'm trying to extract both left values of both positions to have :</p>
  
  <pre><code>left1 = 0
  left2 = -143
  </code></pre>
  
  <p>How can i do this please?</p>