Sorting Alphanumeric strings

Hi,

If i understand your requirement correctly, the following will work.

arrStr = arrStr.OrderBy(Function(s) Int64.Parse(System.Text.RegularExpressions.Regex.Replace(s,"\D","A"), System.Globalization.NumberStyles.HexNumber)).ToArray

Please note that this expression assumes length of each item is same.

Regards,

1 Like