fork(1) download
  1. x <- "I like_to see_how_too"
  2. #strsplit(x, "^((?:[^_]*_){1}+[^_]*)_", perl=TRUE)
  3. #gsub("^((?:[^_]*_){0}+[^_]*)_", "~\\1~", x, perl=TRUE);
  4.  
  5. strsplit(gsub("^((?:[^_]*_){0}+[^_]*)_", "\\1~", x, perl=TRUE), "~")
Success #stdin #stdout 0.3s 22832KB
stdin
Standard input is empty
stdout
[[1]]
[1] "I like"         "to see_how_too"