summaryrefslogtreecommitdiff
path: root/bs/re.scm
diff options
context:
space:
mode:
Diffstat (limited to 'bs/re.scm')
-rw-r--r--bs/re.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/bs/re.scm b/bs/re.scm
new file mode 100644
index 0000000..6ecc074
--- /dev/null
+++ b/bs/re.scm
@@ -0,0 +1,11 @@
+#!r6rs
+(library (bs re (0))
+ (export match group)
+ (import (rnrs base (6))
+ (ice-9 regex))
+ (define (match s pat)
+ (string-match pat s))
+ (define (group m n)
+ (if m
+ (match:substring m n)
+ #f)))