private static int CompareRegexPairs(KeyValuePair<int, string> x, KeyValuePair<int, string> y) { return x.Key.CompareTo(y.Key) * -1; }