m-ender / retina

A regex-based programming language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement $:n and $;n

m-ender opened this issue · comments

The :; modifiers are currently only available for entire-match elements, not for numbered and named groups. A potentially very useful feature would be to generate the cumulative capture count (from the left or right) for that group, including the current match. However, that needs some changes in the code base, since this should generate a number, even if the given group doesn't exist in the current match (or separator).