[REBOL] Re: Multi-searches
From: brett:codeconscious at: 21-Feb-2002 1:16
Hi Philippe,
You can use find in a loop. Save the result of the previous find so that you
do another find after the last one:
find-multiple: function [
"Searches the series and returns the positions where the value occurs."
series [series!]
value [any-type!]
][result][
result: copy []
while [all [not tail? series found? series: find/only series value]][
insert tail result index? series
series: next series
]
result
]
find-multiple ["red" "green" "blue" "red"] "red"
Regards,
Brett.