I want to order a string so that the capital letters come first. To make it harder it would be nice to follow the pattern of another variable.
Lets say I have
$x = "FAcfAC";
and I want to order this firstly in the order of characters in
$y = "FAC";
then with the capital letter first, so that the result is
$result = "FfAACc"