[REBOL] Search string x for any substring found in block y.
From: louisaturk::coxinet::net at: 10-Dec-2001 16:22
Why won't the following function work? Is there a better way to do
this? Is there a native rebol function for this that I have missed?
x: "There is a dog in the barn."
y: ["pig" "dog" "skunk"]
findany: func [
"Searches string x for any substring found in block y."
x [string!] "string"
y [block!] "block of substrings"
loop length? y [
if find x y/count [true break]
count: count + 1
if findany x y [print found]