我有这个片段来执行正则表达式搜索:
public IEnumerable<MyMatch> GetMyMatches()
{
Match m = myRegex.Match(Text, offset);
if (m != null && m.Success && m.Value != null && m.Value.Length > 0)
{
offset = m.Index+m.Length;
yield return new MyMatch() { Match=m, SomeFurtherInformation=... };
} else
yield break;
}
如您所见,我逐一记录了文本中的所有事件。
但是如何反转搜索方向呢?
谢谢你的帮助
最佳答案
关于c# - 正则表达式:反转匹配顺序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7696161/