Natural sort order


Natural sort order is an ordering of strings in alphabetical order, except that multi-digit numbers are treated atomically, i.e., as if they were a single character. Natural sort order has been promoted as being more human-friendly than the machine-oriented pure alphabetical order.
For example, in alphabetical sorting "z11" would be sorted before "z2" because "1" is sorted as smaller than "2", while in natural sorting "z2" is sorted before "z11" because "2" is sorted as smaller than "11".
Alphabetical sorting:
  1. z11
  2. z2
Natural sorting:
  1. z2
  2. z11
The Natural Order Mac OS System Extension was conceived and implemented overnight on-site as an entry for the Best Hack contest during the 1996 MacHack conference in Dearborn, Michigan.
Dave Koelle wrote the Alphanum Algorithm in 1997 and Martin Pool published Natural Order String Comparison in 2000.
Functionality to sort by natural sort order is now widely available in software libraries for many programming languages.