fork(1) download
  1. x <- "{(i,j) foo (k,l) bar (m,n,o)} should match on (h,j), (a,s), and (i,o,g)."
  2. regmatches(x, gregexpr("(?:\\G(?!\\A)|{)[^{}]*?\\K\\([^()]*\\)(?=[^{}]*})", x, perl=TRUE))
Success #stdin #stdout 0.22s 38880KB
stdin
Standard input is empty
stdout
[[1]]
[1] "(i,j)"   "(k,l)"   "(m,n,o)"