I want to match common words between two strings
// C# code
string str1,str2;
I want to check five words in the first fifteen words of string str1
str1="Musician Ben Sollee on the Ravages of Coal and the Wonders of the Bicycle"
str2="There is Wonders of Musician Ben Sollee on the Ravages of Coal"
I want to skip verb comparision from above strings like “of”, “on”, “the” etc.. only check words without verbs…
from above strings I want to compare str2 with str1 if it contain five duplicate words then give message it contains some duplicate words..
How I compare it and check it contains duplicates. I am happy with either a jQuery or C# answer.
One-liner Linq query for bonus points?