using System.Collections.Generic;
using System.Text.RegularExpressions;
public static void Main()
List<string> mylist = new List<string>(new string[] { "x8.11", "x8.22", "x8.2" });
mylist = mylist.OrderByAlphaNumeric(x=>x).ToList();
mylist.ForEach(Console.WriteLine);
public static class IEnumerableSortingExtensions
public static IEnumerable<T> OrderByAlphaNumeric<T>(this IEnumerable<T> source, Func<T, string> selector)
.SelectMany(i => Regex.Matches(selector(i), @"\d+").Cast<Match>().Select(m => (int?)m.Value.Length))
return source.OrderBy(i => Regex.Replace(selector(i), @"\d+", m => m.Value.PadLeft(max, '0')));