Natural Sort - Problem with decimal points in mixed strings
Natural Sort - Problem with decimal points in mixed strings

Hello,
we get a '1' (first is higher than the second) as return value, if we sort this two strings:
naturalSort("0.25 Ah", "0.7 Ah")!
But without " Ah" it is correct!
Greetings
Arvid
This discussion has been closed.
Answers
The natural sort script split it wrong at line "xN = x.replace(re ..." and the next one!
The split arrays are ["0", ".", "25", " Ah"] and ["0", ".", "7", " Ah"]!
But it must be ["0.25", " Ah"] and ["0.7", " Ah"]!