let string_to_sort s = 
  try begin
    match (String.get s 0) with (* Depending on the first letter *)
      | 'a' -> Alpha
      | 'g' -> let regexp = Str.regexp "grade\\([0-9\\.]*\\)" in 
          if (Str.string_match regexp s 0) then 
            let gadd = pa_of_string (Str.matched_group 1 s) in Grade gadd
          else No_order
      | 't' -> let regexp = Str.regexp "team\\([0-9\\.]*\\)" in 
          if (Str.string_match regexp s 0) then 
            let tadd = pa_of_string (Str.matched_group 1 s) in Team tadd
          else No_order
      | _   -> No_order
  end with _ -> No_order