title: Search for matches to argument pattern within every item of a character vector and a window function
body: <p>I have the following string</p>
  <pre><code>library(stringi)
  s=stri_rand_lipsum(10)
  </code></pre>
  <p>Function <code>grepl</code> searches for matches to argument pattern within every item of a character vector. As far as I know, it performs the search of just one word at once. For example if I would like to search &quot;conubia&quot; and &quot;viverra&quot; I have to perform two searches:</p>
  <pre><code>x=s[grepl(&quot;conubia&quot;,s)]
  x=x[grepl(&quot;viverra&quot;,x)]
  </code></pre>
  <p>Anyway, I would like to search two or more terms which appear in the same entry of <code>s</code> within a window of length equal to, e.g. 140 characters.</p>