0

I am trying to sort questions by their numbers. The numbers may include spaces or dots as spacers. So a sorted set may look like the following:

'1', '1.1', '1.2', '1.2.1', '1.2.a', '1.2 a', '1.2.b', '1.2.c', '1.5', '1.2a', '2', '3', '20'

I guess the first thing would be to replace all spaces with dots and then sort the set as a floating point integers whereby a, b, c... comes after 7, 8, 9

Timothy
  • 4,198
  • 6
  • 49
  • 59

0 Answers0