Hi,

TBrownell wrote:

> Very nice indeed...now just one more aspect..
> what if you want to find one match from 2 strings?
> eg.
> cat: [["furry "feline"]["fluffy" "kitty"]]
> dog: [["old" "yeller"]["rin" "tin" "tin"]]
>
> and I need an expression that will come back as TRUE
> for foo: "Old yeller done gone and ate my fluffy
> kitty." or.. if found dog: "old yeller" AND if found
> "ate" AND if found cat: "fluffy kitty" then
> dog-ate-cat: true
>
> Thanks again.
> TBrownell
>
> --- [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > TBrownell wrote:
> >
> > > That works great, but how about finding more than
> > one
> > > word in the string...eg. cat: ["fat cat" "furry
> > > feline"]
> > > Thanks in advance
> >
> > cat: [["fat" "cat"] ["furry" "feline"]]
> > foo: "My kitty has eaten a furry feline and a fat
> > cat."
> > words: parse foo "."
> > foreach stc cat [
> >     if found? find words stc [
> >         prin "found: " print stc
> >     ]
> > ]
> >

Not sure, if I understand what you need... You could say something
like this:

foo: {Old yeller done gone and ate my fluffy kitty.}
words: parse foo "."
dog-ate-cat: found? all [
    find words ["old" "yeller"]
    find words "ate"
    find words ["fluffy" "kitty"]
]




Reply via email to