There is a DB from one table in which 3 fields: ID, English word, transfer.
For one of the tasks, I read only verbs with the help of such an expression (in my case all verbs start with a part of "To")
words = wordsfromDB.Where(w => w.EnglishWord.StartsWith("To")).ToList();
Now I want to implement the ability to read only phrasal verbs, that is, the value "To give" is not considered, and the value "To give up" is considered.
That is, it must read all entries that begin with "To" and which have at least 3 words.
Help make the right condition.
w.EnglishWord.StartsWith("To")
specify a regular expression. for example,Regex.Match("to\s+\w+\s+up").Success
- Stackw.EnglishWord.Split(' ', StringSplitOptions.RemoveEmptyEntries).Length > 2
and this is also inWhere
after ToList - Grundy