title: Group strings with similar pattern in Ruby
body: <p>I have an array of filenames. A subset of these may have similar pattern like this (alphabet strings with a number at the end):</p>
  
  <pre><code>arr = %w[
    WordWord1.html
    WordWord3.html
    WordWord10.html
    WordWord11.html
    AnotherWord1.html
    AnotherWord2.html
    FileFile.html
  ]
  </code></pre>
  
  <p>How to identify the similar ones (they have identical substring, just their numbers differ) and move them to an array ?</p>
  
  <pre><code>['WordWord1.html', 'WordWord3.html', 'WordWord10.html', 'WordWord11.html']
  ['AnotherWord1.html', 'AnotherWord2.html']
  ['FileFile.html']
  </code></pre>