I have a list of groups with contexts appended like so: c_group.spo.cairns.qd a_group.spo.cairns.qd n_group.spo.cairns.qd v1_group.inc.spo.cairns.qd aa_group.inc.spo.cairns.qd za_group.nda.mackay.qd gb_group.nda.mackay.qd aa_group.nda.mackay.qd ab_group.inc.nda.mackay.qd The group name is the first part before the first full stop eg. first one is c_group The context is everything after the first full stop eg. first one is spo.cairns.qd I need to sort the list so everything is grouped first al