title: How to select based on a partial string match in Mathematica
body: <p>Say I have a matrix that looks something like this: </p>
  
  <pre><code>{{foobar, 77},{faabar, 81},{foobur, 22},{faabaa, 8},
  {faabian, 88},{foobar, 27}, {fiijii, 52}}
  </code></pre>
  
  <p>and a list like this:</p>
  
  <pre><code>{foo, faa}
  </code></pre>
  
  <p>Now I would like to add up the numbers for each line in the matrix based on the partial match of the strings in the list so that I end up with this:</p>
  
  <pre><code>{{foo, 126},{faa, 177}}
  </code></pre>
  
  <p>I assume I need to map a Select command, but I am not quite sure how to do that and match only the partial string. Can anybody help me? Now my real matrix is around 1.5 million lines so something that isn't too slow would be of added value.</p>