【发布时间】:2011-06-21 19:28:38
【问题描述】:
我想匹配两个字符串之间的常用词
// C# code
string str1,str2;
我要检查字符串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"
我想跳过“of”、“on”、“the”等字符串中的动词比较。只检查没有动词的单词...
从上面的字符串我想比较 str2 和 str1 如果它包含五个重复的单词然后给它包含一些重复单词的消息..
我如何比较它并检查它是否包含重复项。我对 jQuery 或 C# 答案感到满意。
【问题讨论】: