Thue++

From Esolang
Jump to navigation Jump to search

Thue, but with RegEx (EMCAscript).
Capture groups exist, and can be accessed by the replacement text with $number.

Examples

Variables:

(var (\w*)="([^"]*)".*)\2::=$1$3

Thue Interpreter:

((\n|^)(\S+):{2}=(\S*)(\n.*\n|\n):{2}=\n.*)\3::=$1$4

Implementation

https://jsfiddle.net/1kbpuyxj/13/