aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/regex.neb4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/regex.neb b/libs/regex.neb
index 8919232..a4460ec 100644
--- a/libs/regex.neb
+++ b/libs/regex.neb
@@ -2,7 +2,9 @@
; for doing regex matches
(func match? :bool (pattern :string text :string)
- (.search pattern text))
+ (if (eq? 0 (length pattern))
+ #true
+ (.search pattern text)))
(func .match-one :bool (left right)
(in? left (list "" "." right)))