title: R filterings rows that contain a combination of words
body: <p>I am working with text data, and looking for a solution to a filtering problem.</p>
  
  <p>I have managed to find a solution which filters for rows that contain 'Word 1' <strong>OR</strong> 'Word 2'</p>
  
  <p>Here's the reproducible code</p>
  
  <pre><code>df=data.frame(UID=c(1,2,3,4,5),Text=c("the quick brown fox jumped over the lazy dog",
                                   "long live the king",
                                   "I love my dog a lot",
                                   "Tomorrow will be a rainy day",
                                   "Tomorrow will be a sunny day"))
  
  
  #Filter for rows that contain "brown" OR "dog"
  filtered_results_1=dplyr::filter(df, grepl('brown|dog', Text))
  </code></pre>
  
  <p>However when I filter for rows that contain both 'Word 1' <strong>AND</strong> 'Word 2', it doesn't work.</p>
  
  <pre><code>#Filter for rows that contain "brown" AND "dog"
  filtered_results_2=dplyr::filter(df, grepl('brown &amp; dog', Text))
  </code></pre>
  
  <p>Cannot figure out the right syntax for this one, any help would be appreciated.</p>