fork download
  1. x <- c("bcl-2 was detected in 45% bcl-6 was not detected",
  2. "bcl-2 was not detected bcl-6 was detected in 45%",
  3. "no evidendce of bcl-2 bcl-6 was detected in 45%")
  4. grep("\\bbcl-2\\b(?:(?!\\bbcl-\\d|\\bnot\\b).)*?\\bdetected\\b", x, perl=TRUE, value=TRUE)
Success #stdin #stdout 0.3s 175424KB
stdin
Standard input is empty
stdout
[1] "bcl-2 was detected in 45% bcl-6 was not detected"