I need to get the number after a word in a data table column, for example:
y = data.table(status =c( "client rating 01 approved", "John Rating: 2 reproved", "Customer rating9") )
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: rating = c(1,2,9)
.
How could I do that considering the variations after the rating like :, double space, no space?