fork download
  1. string <- "text1 text2(stuff)(blahh) text3"
  2. sub(".*text2\\([^()]*\\)(?:\\(([^()]*)\\))?.*", "\\1", string, perl=TRUE)
Success #stdin #stdout 0.24s 39440KB
stdin
Standard input is empty
stdout
[1] "blahh"