title: Javascript sort string with numbers at the end of dupliacte strings
body: <p>I am trying to sort an array by &quot;itemCommodity&quot;. I need to sort my array by the smallest number at the start of the string and the highest number at the end. For example:</p>
  <p><code>[&quot;Untitled Form - 16&quot;, &quot;Untitled Form - 1&quot;, &quot;Untitled Form - 7&quot;, &quot;Untitled Form - 2&quot;, &quot;Untitled Form - 3&quot;, &quot;Untitled Form - 4&quot;, &quot;Untitled Form - 5&quot;, &quot;Untitled Form - 8&quot;, &quot;Untitled Form&quot;];</code></p>
  <p>Should be displayed as:</p>
  <p><code>[&quot;Untitled Form&quot;, &quot;Untitled Form - 1&quot;, &quot;Untitled Form - 2&quot;, &quot;Untitled Form - 3&quot;, &quot;Untitled Form - 4&quot;, &quot;Untitled Form - 5&quot;, &quot;Untitled Form - 7&quot;, &quot;Untitled Form - 8&quot;, &quot;Untitled Form - 16&quot;];</code></p>
  <p>I hope someone can help me out with this.</p>