s <- "Hello \\ [World]"sgsub("[]\\[]","==",s)
Standard input is empty
[1] "Hello \\ [World]" [1] "Hello == ==World=="
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!