如何找出c#中句子中的下一个单词?

Feb*_*J S 3 .net c# regex

我有一个字符串

" 蝙蝠和球不是笔或船不是电话 "

我要挑靠近的话

例如 - "不是笔","不是电话"

但我无法做到这一点?我试图通过使用索引和子字符串来获取单词,但它不可能.

   tempTerm = tempTerm.Trim().Substring(0, tempTerm.Length - (orterm.Length + 1)).ToString();
Run Code Online (Sandbox Code Playgroud)

Adr*_*der 9

如何使用一些正则表达式

就像是

string s = "bat and ball not pen or boat not phone";
Regex reg = new Regex("not\\s\\w+");
MatchCollection matches = reg.Matches(s);
foreach (Match match in matches)
{
    string sub = match.Value;
}
Run Code Online (Sandbox Code Playgroud)

有关更多详细信息,请参阅使用C#和.NET学习正则表达式(Regex)语法