Handbook
Glossary
all-matching-slices ( string regexp -- seq )
Regular expressions
ยป
Matching operations with regular expressions
Prev:
count-matches ( string regexp -- n )
Next:
all-matching-subseqs ( string regexp -- seq )
Vocabulary
regexp
Inputs
string
a
string
regexp
a
regexp
Outputs
seq
a sequence of slices of the input
Word description
Finds a sequence of disjoint substrings which each match the pattern. It chooses this by finding the leftmost longest match, and then the leftmost longest match which starts after the end of the previous match, and so on.
Definition
USING:
sequences.private
;
IN:
regexp
:
all-matching-slices
( string regexp -- seq )
[
<slice-unsafe>
]
map-matches
;