代码之家  ›  专栏  ›  技术社区  ›  Tim Pietzcker

哪个regex flavors支持捕获(而不是捕获组)?

  •  6
  • Tim Pietzcker  · 技术社区  · 16 年前

    就像我刚学到的 this question , .NET regexes can access individual matches within a repeated capturing group .

    也就是说,如果我使用类似regex的 \b(\w+\s*)+ 对于一个字符串,只有最后一个单词将存储在 \1 或 Match.Groups(1).Value 但使用 Match.Groups(1).Captures 我可以访问所有与regex迭代的匹配项。

    除了.NET,还有其他的regex风格支持这个吗?

    1 回复  |  直到 16 年前
        1
  •  4
  •   Alan Moore Chris Ballance    16 年前

    据我所知,只有.NET和Perl6提供这种功能。