在:
string str = "On the screen the faint, old, robed figure of Mercer toiled upward, and all at once a rock sailed past him.";
搜索子字符串:
string find = "figure of";
如果这样的话:
string reg = string.Format("({0} +([\\w+]+))", find);
var result = new Regex(reg).Match(str);
我可以跟踪搜索到的句子
figure of Mercer
但是如何在搜索的句子之前找到短语的一部分:
On the screen the faint, old, robed
仅获取最近的单词:
robed
答案 0 :(得分:1)