<- Back to shtanton's homepage
summaryrefslogtreecommitdiff
path: root/go.mod
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2022-09-21 21:05:34 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2022-09-21 21:05:34 +0100
commit0a8690993d572a50b95dd4f1c1903ed00ddb9c2b (patch)
tree2ab207544c88ff19308e22c8b79c3ea349c97faa /go.mod
downloadsubex-0a8690993d572a50b95dd4f1c1903ed00ddb9c2b.tar
Initial commit
Parses and executes substitute expressions (subexes) So far subex has the following operations: - Concatenation of a and b with ab - Or with | - Repeat maximally with * - Repeat minimally with - - Copy a specific character 'a' - Copy any character '.' - Store text matching a regex into slot 's': `$s(regex)` - Output text in "" including loading from slots with '$' Regexes support all the same operations as subexes minus storing and outputting This first implementation gives very little thought to efficiency Example: ./main 'according to all known laws of aviation' '$1(.-)$m(( .* )| ).*"$m$1"' This swaps the first and last words of the input string
Diffstat (limited to 'go.mod')
-rw-r--r--go.mod3
1 files changed, 3 insertions, 0 deletions
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..6967dfd
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module main
+
+go 1.18