Handbook
Glossary
(each-match-backward) ( ... i string regexp quot: ( ... start end string -- ... ) -- ... )
Vocabulary
regexp
.
private
Inputs
i
an
object
string
an
object
regexp
an
object
quot
a
quotation
with stack effect
( ... start end string -- ... )
Outputs
None
Definition
USING:
kernel
math
;
IN:
regexp.private
::
(each-match-backward)
( ... i string regexp quot: ( ... start end string -- ... ) -- ... )
i -1
>=
[
i string regexp
do-next-match
[|
start end |
start 1
+
end 1
+
string quot
call
start end
eq?
[
start 1
-
]
[
start
]
if
string regexp quot
(each-match-backward)
]
[
2drop
]
if
]
when
;
inline
recursive