I have a character vector as:
x<- \"\\t\\t\"
and
y<- \"TOT_A01\"
Try
sub('(?<=").*(?=")', y, x, perl=TRUE) #[1] "\t\t"