Regex word = new Regex(@"\w+"); string data = "The quick brown fox jumps over the lazy dog."; Console.WriteLine(word.Matches(data).Count);
string Input; Input=Console.ReadLine(); string[] Output=Input.Split(' '); Console.WriteLine("No of Words in Given String is {0}",Output.Length.ToString());
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)