fork(2) download
  1. x <- c("005", "0AB", "000", "0")
  2. sub("^0+(?!$)", "", x, perl=TRUE)
Success #stdin #stdout 0.2s 39268KB
stdin
Standard input is empty
stdout
[1] "5"  "AB" "0"  "0"