From: Bruno.Verlyck@inria.fr
Subject: Re: scsh bug ?
I see no accessible way (no module exporting a function) to know if
sub-match 1 has matched nothing. Is there another approved way I can't
see, or is it time to extend scsh-regexp-interface ?
I fixed the C underpinnings to make this work in the last release, and then
didn't export it to Scheme. I think the right thing to do would be to re-define
match:start and match:end to return false when the subexp doesn't match. I've
changed the two functions in re.scm to be
(define (match:start match . maybe-index)
(vector-ref (regexp-match:start match)
(:optional maybe-index 0)))
(define (match:end match . maybe-index)
(vector-ref (regexp-match:end match)
(:optional maybe-index 0)))
It's in the manual and will be the next release.
-Olin
|