I am using following code which extracts the text between quotation in R. It works fine, the only problem is that it does not save the extracted text in a variable. What am I missing here? Is there a better way of doing this?
var2 <- cat(sub('.*"(.*)".*', "\\1", var1))
var2