assuming i have these following phrases:
- "apple orange pear"
- "orange apple"
- "apple"
- "pear orange"
- "apple pear"
I want to match all phrases containing "apple" but only when it doesn't contain "orange" i.e. 3 & 5
How can i do it using just a single regex expression in R with functions e.g. grepl() but with only 1 regex expression? i.e. grepl(regex, vector) = F F T F T