title: keep words after keyword in string R
body: <p><strong>Problem:</strong> I am working with a tokenizer for text mining and would like to limit the length of strings in my input data. The following code keeps the 
  entire string if the word is included. </p>
  
  <pre><code>    #create data frame with data 
      dd &lt;- data.frame(
      text = c("hello how are you doing thank 
                you for helping me with this 
                problem","junk","junk"), stringsAsFactors = F)
  
     #keep string that only include term "how"
     dd &lt;- filter(dd, grepl('how', text))
  </code></pre>
  
  <p><strong>Question:</strong> How can I modify the code to just keep N words after the key words. </p>
  
  <p>e.g. </p>
  
  <p>if N =1 then dd would include: how are </p>
  
  <p>if N =2 then dd would include: how are you</p>
  
  <p>if N =3 then dd would include: how are you doing</p>
  
  <p><strong>...</strong></p>
  
  <p>I need code that would work if I also included additional words in the keep:</p>
  
  <pre><code>   #keep string that only include terms "how" and "with"
     dd &lt;- filter(dd, grepl('how|with', text))
  </code></pre>