I have a list of many words. I need to find all words ending in "ing", "ed", "ied" and with one vowel and double consonant before: Must match the words: ask, clap, tie. Not relevant help ("lp" -not double consonant)
\w*[^aoyie][aoyie]([^aoyie])\1(ed|ing|ied)
It works on RegexPal.com, but it does not work in C # (does not match any words, returns 0 words in the list)
My code is:
List<Book_to_Word> allWords = (from f in db2.Book_to_Words.AsEnumerable() select f).ToList(); List<Book_to_Word> wordsNOTExist = (from f in allWords where Regex.IsMatch(f.WordStr, @"^(\w*[^aoyie]+[aoyie]([^aoyie])(ed|ing|ied))$") select f).ToList();
It works when I do not use \ 1. But returns words with one consonant.
source share