summaryrefslogtreecommitdiff
path: root/re.go
diff options
context:
space:
mode:
Diffstat (limited to 're.go')
-rw-r--r--re.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/re.go b/re.go
index 714afcf..90a9fda 100644
--- a/re.go
+++ b/re.go
@@ -11,7 +11,8 @@ func re(s, r string) string {
return ""
}
z := strings.Split(r[2:], string(r[1]))
- if len(z) < 2 {
+ // match s// and s///
+ if len(z) < 2 || len(z) > 3 {
return ""
}
re, err := regexp.Compile(z[0])