title: Retrieving numeric characters from a string
body: <p>I have a string like this -</p>
  
  <pre><code>[ [ -2, 0.5 ],
  </code></pre>
  
  <p>I want to retrieve the numeric characters and put them into an array that will end up looking like this:</p>
  
  <pre><code>array(
    [0] =&gt; -2,
    [1] =&gt; 0.5
  )
  </code></pre>
  
  <p>What is the best way of doing this?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>An more thorough example</p>
  
  <pre><code>[ [ -2, 0.5, 4, 8.6 ],
    [ 5,  0.5, 1, -6.2 ],
    [ -2, 3.5, 4, 8.6 ],
    [ -2, 0.5, -3, 8.6 ] ]
  </code></pre>
  
  <p>I am going through this matrix line by line and I want to extract the numbers into an array for each line.</p>