diff options
author | Ben Sima <ben@bsima.me> | 2020-05-13 13:32:14 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-05-13 13:32:14 -0700 |
commit | e6ad8129cc854dac38940acb24e3a07cd0cd7b56 (patch) | |
tree | dfadd90e9039184e3d1415cdcddfcd39108e9d5c /bs/re.scm | |
parent | 5fc1cc6602ac03d05ce004d8d4d9c712242f318b (diff) |
Re-namespace general scheme code to bs
Diffstat (limited to 'bs/re.scm')
-rw-r--r-- | bs/re.scm | 11 |
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))) |