title: Multiple regex match and assignment in data.table
body: <p>I am trying to match a regex which outputs several values and assign it in-place to several new variables inside a data.table</p>
  
  <pre><code>library(data.table)
  library(stringr)
  
  fruit_regex &lt;- "(\\d+): apples=(.*), oranges=(.*)"
  
  DT &lt;- data.table(V1=c("1: apples=0.1, oranges=0.01",
              "2: apples=0.2, oranges=0.02",
              "3: apples=0.3, oranges=0.03",
              "4: apples=0.4, oranges=0.04",
              "5: apples=0.5, oranges=0.05"))
  
  DT[, c("txt","id","apples", "oranges"):= as.list(str_match_all(V1, fruit_regex))]
  </code></pre>
  
  <p>This, of course, fails and I am getting</p>
  
  <pre><code>&gt;Warning messages:
  &gt;1: In `[.data.table`(DT, , `:=`(c("txt", "id", "apples", "oranges"),  :
  &gt;  Supplied 4 columns to be assigned a list (length 5) of values (1 unused)
  </code></pre>
  
  <p><code>str_match_all()</code> says to be vectorized over patterns and strings, but for some reason I can not get it to work. </p>
  
  <p>There's another known issue with my regex which returns a redundant full match and can be cured with lookaround assertions. </p>
  
  <p>Desired result(looking away from redundant <code>V1</code> and <code>txt</code> fields):</p>
  
  <pre><code>id apples oranges
  1      0.1   0.01
  2      0.2   0.02
  3      0.3   0.03
  4      0.4   0.04
  5      0.5   0.05
  </code></pre>