title: How do I detect groups of common strings in filenames
body: <p>I'm trying to figure out a way to detect groups of files. For instance:</p>
  <p>If a given directory has the following files:</p>
  <ul>
  <li>Birthday001.jpg</li>
  <li>Birthday002.jpg</li>
  <li>Birthday003.jpg</li>
  <li>Picknic1.jpg</li>
  <li>Picknic2.jpg</li>
  <li>Afternoon.jpg.</li>
  </ul>
  <p>I would like to condense the listing to something like</p>
  <ul>
  <li>Birthday ( 3 pictures )</li>
  <li>Picknic  ( 2 pictures )</li>
  <li>Afternoon ( 1 picture )</li>
  </ul>
  <p>How should I go about detecting the groups?</p>