fork download
  1. x <- c(
  2. "The dog and the man play in the park.",
  3. "The man plays with the dog.",
  4. "That is the man's hat.",
  5. "Man I love that dog!",
  6. "I'm dog tired"
  7. )
  8.  
  9. ## this works but I want a single regex
  10. grepl("^(?=.*\\bman\\b)(?=.*\\bdog\\b)", x, ignore.case=TRUE, perl=TRUE)
Success #stdin #stdout 0.29s 22840KB
stdin
Standard input is empty
stdout
[1]  TRUE  TRUE FALSE  TRUE FALSE