title: Natural sorting
body: <p>I have some files that need to be sorted by name, unfortunately I can't use a regular sort, because I also want to sort the numbers in the string, so I did some research and found that what I am looking for is called <a href="https://en.wikipedia.org/wiki/Natural_sort_order" rel="nofollow noreferrer">natural sorting</a>.</p>
  <p>I tried the solution given <a href="http://code.activestate.com/recipes/285264-natural-string-sorting/#c3" rel="nofollow noreferrer">here</a> and it worked perfectly.</p>
  <p>However, for strings like <code>PresserInc-1_10.jpg</code> and <code>PresserInc-1_11.jpg</code> which causes that specific natural key algorithm to fail, because it only matches the first integer which in this case would be <code>1</code> and <code>1</code>, and so it throws off the sorting. So what I think might help is to match all numbers in the string and group them together, so if I have <code>PresserInc-1_11.jpg</code> the algorithm should give me <code>111</code> back, so my question is, is this possible ?</p>
  <p>Here's a list of filenames:</p>
  <p><code>files = ['PresserInc-1.jpg', 'PresserInc-1_10.jpg', 'PresserInc-1_11.jpg', 'PresserInc-10.jpg', 'PresserInc-2.jpg', 'PresserInc-3.jpg', 'PresserInc-4.jpg', 'PresserInc-5.jpg', 'PresserInc-6.jpg', 'PresserInc-11.jpg']</code></p>