Skip to main content
6 of 8
saved 9 bytes
Arnauld
  • 197.6k
  • 20
  • 179
  • 650

##JavaScript (ES6), 105 110 101 bytes

Assumes that each numeric element is up to 99 characters long.

a=>a.map(s=>[s.toLowerCase().replace(/\d+/g,n=>('0'.repeat(99)+n).slice(-99)),s]).sort().map(a=>a[1])

###Test

let f =

a=>a.map(s=>[s.toLowerCase().replace(/\d+/g,n=>('0'.repeat(99)+n).slice(-99)),s]).sort().map(a=>a[1])

console.log(f([
  'Cat05.jpg',
  'Meme00.jpeg',
  'cat1.jpeg',
  'cat02.jpg',
  'meme03-1.jpeg',
  'meme03-02.jpg',
  'meme04.jpg'
]).join('\n'))

Arnauld
  • 197.6k
  • 20
  • 179
  • 650