title: Consecutive string matching in a sentence using R
body: <p>I have names of some 7 countries which is stored somewhere like:</p>
  
  <pre><code>Random &lt;- c('norway', 'india', 'china', 'korea', 'france','japan','iran')
  </code></pre>
  
  <p>Now, I have to find out using r if a given sentence has these words.
  Sometimes the name of a country is hiding in the consecutive letters within a sentence. 
  for ex:</p>
  
  <p>You all must pay it bac**k, or ea**ch of you will be in trouble.</p>
  
  <p>If this sentence is passed it should return "korea"</p>
  
  <p>I have tried:</p>
  
  <pre><code>grep('You|all|must|pay|it|back|or|each|of|you|will|be|in|trouble',Random, value = TRUE,ignore.case=TRUE,
   fixed = FALSE)
  </code></pre>
  
  <p>it should return korea</p>
  
  <p>but it's not working. Perhaps I should not use Partial Matching, but i dont have much knowledge regarding it.</p>
  
  <p>Any help is appreciated.</p>