title: Get a number after a word pattern in R
body: <p>I need to get the number after a word in a data table column, for example:</p>
  
  <pre><code>y = data.table(status =c( "client rating 01 approved", "John Rating: 2 reproved", "Customer rating9") )
  </code></pre>
  
  <p>Then, I need to get the number after the word rating and create a new column with that rating number, in the example, it should be: <code>rating = c(1,2,9)</code>.</p>
  
  <p>How could I do that considering the variations after the rating like :, double space, no space?</p>