m-ender / retina

A regex-based programming language.
MIT License
231 stars 10 forks source link

Add a substitution element for the index of the current match #76

Closed m-ender closed 5 years ago

m-ender commented 5 years ago

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.

m-ender commented 5 years ago

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