fork download
  1. input = "I am a football fan"
  2. gsub("(?i)\\b[a-z]\\b", "REPLACEMENT", input, perl=T) ## To replace 1 ASCII letter words
  3. gsub("(?i)\\b[a-z]{2}\\b", "REPLACEMENT", input, perl=T) ## To replace 2 ASCII letter words
  4.  
Success #stdin #stdout 0.45s 79168KB
stdin
Standard input is empty
stdout
[1] "REPLACEMENT am REPLACEMENT football fan"
[1] "I REPLACEMENT a football fan"