summaryrefslogtreecommitdiff
path: root/re.go
diff options
context:
space:
mode:
Diffstat (limited to 're.go')
-rw-r--r--re.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/re.go b/re.go
deleted file mode 100644
index 9429ac8..0000000
--- a/re.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package main
-
-import (
- "regexp"
- "strings"
-)
-
-func re(s, r string) string {
- // min: s//
- if len(s) < 3 {
- return ""
- }
- z := strings.Split(r[2:], string(r[1]))
- // match s// and s///
- if len(z) < 2 || len(z) > 3 {
- return ""
- }
- re, err := regexp.Compile(z[0])
- if err != nil {
- return ""
- }
- return re.ReplaceAllString(s, z[1])
-}