Which regex flavors support captures (as opposed to capturing groups)?
As I just learned from this question, .NET regexes can access individual matches within a repeated capturing group.
I. e., if I apply a regex like \b(\w+\s*)+
to a string of words, only the last word will be stored in \1
or Match.Groups(1).V开发者_运维技巧alue
, but using Match.Groups(1).Captures
I get access to all the individual matches the regex iterated over.
Are there other regex flavors that support this besides .NET?
As far as I know, only .NET and Perl 6 offer that capability.
精彩评论