Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: findany

From: louisaturk:eudoramail at: 23-Dec-2001 23:30

Ok, this works: findany: func [ "Searches string x for any substring found in block y." x [string!] "string" ys [block!] "block of substrings" ] [ foreach y ys [ either find x y [z: true break] [z: false] ] z ] x: "There is a dog in the barn." ys: ["cat" "pig" "dog" "skunk"] if findany x ys [print "found"] But is there a better way? Louis At 11:09 PM 12/23/2001 -0600, you wrote: