fork(1) download
  1. vec <- c("time of the day", "word of the day", "time the day")
  2. gsub("\\bof the\\b(*SKIP)(?!)|\\bthe\\b", "of the", vec, perl=TRUE)
  3. ## => [1] "time of the day" "word of the day" "time of the day"
  4.  
Success #stdin #stdout 0.26s 38824KB
stdin
Standard input is empty
stdout
[1] "time of the day" "word of the day" "time of the day"