Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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).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?

like image 537
Tim Pietzcker Avatar asked Apr 16 '10 11:04

Tim Pietzcker


1 Answers

As far as I know, only .NET and Perl 6 offer that capability.

like image 98
Alan Moore Avatar answered Oct 01 '22 04:10

Alan Moore