in reply to sort array by part of the string

Right off the bat, go read How (Not) To Ask A Question. Having said that:

The cake is a lie.
The cake is a lie.
The cake is a lie.