How to find all words which contain a specific letter in it?
For example, if my string is
This is a Station called South Yarra
then I
Solution without regex using Linq :
List arr = s.Split(' ').Where(x => x.Contains('a')).ToList();
string.Split(' ') : It return array of strings that contains the substrings in this instance that are delimited by ' '
Enumerable.Where(predicate) : Filter sequence based on predicate
Enumerable.Contains() : Determines whether a sequence contains a specified element
POC: .net Fiddle