update: also you're not sorting based on N at all. If you did, your sorted list would start with '1 - foo - xxx', '1 - bar - aaa', '1 - bar - atc' (in whatever order).
You appear to be splitting the array into parts based on some unknown criteria, then sorting those parts based on N, and then recombining the parts.
In reply to Re: How to Sort Numerical String
by Joost
in thread How to Sort Numerical String
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |