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).Value
, 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With