I use grep on some projects in R (which uses the perl=TRUE flag), and for a living I canβt understand why R keeps throwing errors. My request is as follows:
 d$SomeColumn[grep("(?ix)<VNW[^;]*;(dis|dat)> \w*<N\(", d$Right, perl=TRUE)] <- 1 
However, R raises the following error:
 Error: '\w' is an unrecognized escape in character string starting ""<VNW[^;]*;(dis|dat)> \w" 
source share