text <- "[Peanut M&M\u0092s]"textreplaced <- gsub("[][]|[^[:ascii:]]", "", text, perl=T)replaced
Standard input is empty
[1] "[Peanut M&M\u0092s]" [1] "Peanut M&Ms"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!