fork(1) download
  1. string <- "apple,banana, cat, doll and donkey; fish,goat"
  2. trimws(gsub("(^|\\p{P})\\s*(.)", "\\1 \\U\\2", string, perl=T))
  3.  
Success #stdin #stdout 0.46s 79168KB
stdin
Standard input is empty
stdout
[1] "Apple, Banana, Cat, Doll and donkey; Fish, Goat"