Here is another possible solution:
static void Main(string[] args) {
string path = <yourFilePath>;
string pattern = "(?<=.{10})\\w{4}(?=.*)";
var result = File.ReadLines(path).OrderBy(x => Regex.Match(x, pattern).Value);
foreach (var item in result) {
Console.WriteLine(item);
}
Console.ReadKey();
}
wizend
No comments:
Post a Comment