title: R grep: Match one string against multiple patterns
body: <p>In R, grep usually matches a vector of multiple strings against one regexp. </p>
  
  <p><strong>Q: Is there a possibility to match a single string against multiple regexps? (without looping through each single regexp pattern)?</strong></p>
  
  <p><em>Some background:</em></p>
  
  <p>I have 7000+ keywords as indicators for several categories. I cannot change that keyword dictionary. The dictionary has following structure (keywords in col 1, numbers indicate categories where these keywords belong to):</p>
  
  <pre><code>ab  10  37  41
  abbrach*    38
  abbreche    39
  abbrich*    39
  abend*  37
  abendessen* 60  63
  aber    20  23  45
  abermals    37
  </code></pre>
  
  <p>Concatenating so many keywords with "|" is not a feasible way (and I wouldn't know which of the keywords generated the hit).
  Also, just reversing "patterns" and "strings" does not work, as the patterns have truncations, which wouldn't work the other way round.</p>
  
  <p>[<a href="https://stackoverflow.com/q/2180085/924912">related question</a>, other programming language]</p>