I need to remove punctuation from the text:
data <- "Type the command AT&W enter. in order to save the new protocol on modem;"
gsub('[[:punct:] ]+',' ',data)
This solution gives the result
[1] "Type the command AT W enter in order to save the new protocol on modem "
This is not the desired result because I would like to save &, hence:
[1] "Type the command AT&W enter in order to save the new protocol on modem "