How to replace \r\n characters in a text string specifically in R
问题 For the life of me, I am unable to strip out some escape characters from a text string (prior to further processing). I've tried stringi, gsub, but I just cannot get the correct syntax. Here is my text string txt <- "c(\"\\r\\n Stuff from a webpage: That I scraped using webcrawler\\r\\n\", \"\\r\\n \", \"\\r\\n \", \"\\r\\n \", \"\\r\\n\\r\\n \", \"\\r\\n\\r\\n \", \"\\r\\n \\r\\n \", \"\\r\\n \")" I'd like to strip out "\\r\\n" from this string. I've tried gsub("[\\\r\\\n]", "", txt) (leaves