title: How do I match all occurrences in R?
body: <p>I have a list of 1000 names. (say A)
  I have another list of 5 names. (say B)
  I want to find out at which row number the 5 names occur in the 1000 number list.</p>
  
  <p>eg. Amy can occur 25 times in A
  And there is Amy in B.
  I want to know which rows Amy occurs in A.</p>
  
  <p>I have used match before, but that only gives the first occurrences of each of the 5 names in B which doesn't serve my purpose.</p>
  
  <p>I need to do it in R. I don't know anything about Regex.</p>
  
  <p>Thanks!</p>