x <- "foo bar" res <- gsub(" ", "\\ ", x, fixed=TRUE)cat(res, "\n")
Standard input is empty
foo\ bar
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!