title: Get changing patterns with grep -- R
body: <p>I want to grade several students exams using an answer key with grep. So for example, the student's answers were</p>
  
  <pre><code>A B B C E D D
  </code></pre>
  
  <p>and the key is</p>
  
  <pre><code>A D B C E CD ABD
  </code></pre>
  
  <p>I want to check to see if the student's answers are found in the corresponding position in the answer key (multiple letters indicate "or" not "and". So "C" or "D"). How would I got about that using grep?</p>