m-ender / retina

A regex-based programming language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a substitution element for the index of the current match

m-ender opened this issue · comments

Say it's $!. Example:

m`^
$!:

Inserts line numbers (and colons) at the start of each line.

This should probably come with an alternative form to count from the end.

This has been implemented in v1.2.0 as $:& and $;&.