original commit: 6fde9e72ec05025cf6923dd7dd63d4cdfb2a7be5
This commit is contained in:
Matthew Flatt 2004-03-08 22:43:35 +00:00
parent 2d50ddb71c
commit 13106dfbd1

View File

@ -296,7 +296,8 @@
;; success-k: ;; success-k:
(lambda (expr string start end match-start match-end) (lambda (expr string start end match-start match-end)
(cons (cons match-start match-end) (cons (cons match-start match-end)
(if (string? string) (if (or (string? string)
(bytes? string))
(regexp-match-positions* expr string match-end end) (regexp-match-positions* expr string match-end end)
;; Need to shift index of rest as reading: ;; Need to shift index of rest as reading:
(map (lambda (p) (map (lambda (p)
@ -338,9 +339,14 @@
(regexp-fn 'regexp-split (regexp-fn 'regexp-split
;; success-k ;; success-k
(lambda (expr string start end match-start match-end) (lambda (expr string start end match-start match-end)
(cons (let ([string (if (and (string? string)
(subbstring string start match-start) (or (bytes? expr)
(regexp-split expr string match-end end))) (byte-regexp? expr)))
(string->bytes/utf-8 string (char->integer #\?))
string)])
(cons
(subbstring string start match-start)
(regexp-split expr string match-end end))))
;; port-success-k: ;; port-success-k:
(lambda (expr string match-string new-end leftovers) (lambda (expr string match-string new-end leftovers)
(cons (cons
@ -362,9 +368,14 @@
(regexp-fn 'regexp-match* (regexp-fn 'regexp-match*
;; success-k: ;; success-k:
(lambda (expr string start end match-start match-end) (lambda (expr string start end match-start match-end)
(cons (let ([string (if (and (string? string)
(subbstring string match-start match-end) (or (bytes? expr)
(regexp-match* expr string match-end end))) (byte-regexp? expr)))
(string->bytes/utf-8 string (char->integer #\?))
string)])
(cons
(subbstring string match-start match-end)
(regexp-match* expr string match-end end))))
;; port-success-k: ;; port-success-k:
(lambda (expr string match-string new-end leftovers) (lambda (expr string match-string new-end leftovers)
(cons (cons