string text = "yay blah blah blah blah woo woo yay yay yay.";
var words = Regex.Split(text, @"\W+")
.AsEnumerable()
.GroupBy(w => w)
.Where(g => g.Count() > 3)
.Select(g => g.Key);
words.ToList().ForEach(Console.WriteLine);
Output:
yay
blah
More Related Contents:
- Is there a good LINQ way to do a cartesian product?
- The result of a query cannot be enumerated more than once
- “The LINQ expression node type ‘Invoke’ is not supported in LINQ to Entities” – stumped!
- Cannot convert lambda expression to type ‘string’ because it is not a delegate type [duplicate]
- Find all child controls of specific type using Enumerable.OfType() or LINQ
- How to make LINQ execute a (SQL) LIKE range search
- The data source does not support server-side data paging
- Will using LINQ to SQL help prevent SQL injection
- Select multiple fields group by and sum
- How to convert DataTable to class Object?
- LINQ to SQL Where Clause Optional Criteria
- A potentially dangerous Request.Path value was detected from the client (*)
- How can I add double quotes to a string that is inside a variable?
- How to get DropDownList SelectedValue in Controller in MVC
- Invalid length for a Base-64 char array
- How do you convert Html to plain text?
- LINQ Where Ignore Accentuation and Case
- An error occurred during report processing. -RLDC reporting in ASP.NET MVC
- How do I log a user out when they close their browser or tab in ASP.NET MVC?
- Deserialize JSON to anonymous object
- Download feature not working within update panel in asp.net
- Why is Asp.Net Identity IdentityDbContext a Black-Box?
- How to merge a list of lists with same type of items to a single list of items?
- Convert Dataset to XML
- Remove columns from DataTable in C#
- Could not load file or assembly ‘System.Net.Http.Formatting’ or one of its dependencies. The system cannot find the path specified
- How to set property value using Expressions? [duplicate]
- C# Clear Session
- Why does ServerVariable[“REMOTE_ADDR”] returns the server IP?
- How to stop crystal report viewer from asking login credentials when opening subreport