fork download
  1. the.string <- "ABCDE982y987r0jhABCdioy2093uiwhf"
  2. the.substrings <- c("ABC", "DEF", "GHI", "987", "ABCDE")
  3. regmatches(the.string, gregexpr(paste(the.substrings, collapse="|"), the.string))
Success #stdin #stdout 0.19s 185728KB
stdin
Standard input is empty
stdout
[[1]]
[1] "ABCDE" "987"   "ABC"