mystring <- c("000450")gsub("\\G0", "x", mystring, perl=TRUE)
Standard input is empty
[1] "xxx450"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!