单词排序,输入一句话,按照单词的顺序排列

单词排序,输入一句话,按照单词的顺序排列,比如输入:Hello, Welecome to Henan Univercity,输出Hello Henan to Univercity Welcome。

Hello Henan to Univercity Welecome
Press any key to continue . . .

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = "Hello, Welecome to Henan Univercity";
            string result = string.Join(" ", Regex.Matches(s, "[a-zA-Z]+").Cast<Match>().Select(x => x.Value).OrderBy(x => x));
            Console.WriteLine(result);
        }
    }
}