I'm trying to use regular expressions in R to find one or more phrases within a vector of long sentences (which I'll call x).
So, for example, this works fine for one phrase:
grep("(phrase 1)",x)
But this doesn't work for two (or more) phrases:
grep("(phrase 1)+(phrase 2)+",x)
As I would expect. As I read it, this last one should give me all matches in x for 1 or more phrase 1s, and 1 or more phrase 2's. But it returns nothing.