fork(1) download
  1. s <- "שללללוווווםםםם ......... שללללוווווםםםם"
  2. gsub("(\\p{Hebrew})\\1{2,}", "\\1", s, perl=TRUE)
  3. gsub("(\\w)\\1{2,}", "\\1", s)
Success #stdin #stdout 0.22s 79168KB
stdin
Standard input is empty
stdout
[1] "שלום .........         שלום"
[1] "שלום .........         שלום"