using System.Text.RegularExpressions;
public static string LongestWord(string sen)
string[] words = Regex.Replace(sen, @"[^a-zA-Z0-9\s]", "").Split(' ');
var longestWords = from word in words
orderby word.Length descending
return longestWords.First();
static void Main(string[] args)
Console.WriteLine(LongestWord("fun&!! time"));
Console.WriteLine(LongestWord("I love dogs"));