title: Extract all numbers from a single string in R
body: <p>Let's imagine you have a string:</p>
  
  <pre><code>strLine &lt;- "The transactions (on your account) were as follows: 0 3,000 (500) 0 2.25 (1,200)"
  </code></pre>
  
  <p>Is there a function that strips out the numbers into an array/vector producing the following required solution:</p>
  
  <pre><code>result &lt;- c(0, 3000, -500, 0, 2.25, -1200)?
  </code></pre>
  
  <p>i.e. </p>
  
  <pre><code>result[3] = -500
  </code></pre>
  
  <p>Notice, the numbers are presented in accounting form so negative numbers appear between (). Also, you can assume that only numbers appear to the right of the first occurance of a number. I am not that good with regexp so would appreciate it if you could help if this would be required. Also, I don't want to assume the string is always the same so I am looking to strip out all words (and any special characters) before the location of the first number.</p>