捕获重复组总是返回最后一个元素,但这并不是很有帮助。例如:
var regex = new RegEx("^(?<somea>a)+$");
var match = regex.Match("aaa");
match.Group["somea"]; // return "a"我希望有一个匹配元素的集合,而不是最后一个匹配项。这有可能吗?
发布于 2012-11-27 17:22:07
看看Captures集合:
match.Groups["somea"].Captureshttps://stackoverflow.com/questions/13580848
复制相似问题