fork(1) download
  1. a <- c("I need only <5 white-spaces removed")
  2. gsub("(?<=\\S)\\s{1,4}(?=\\S)", "", a, perl=TRUE)
Success #stdin #stdout 0.21s 39756KB
stdin
Standard input is empty
stdout
[1] "Ineed             only                <5                         white-spacesremoved"