After having said that (see below) this is the closest I could get: Assuming that your sentence ONLY includes BLANK as a word separator: cat: [ [thru "cat " | thru " cat" | thru "kitty " | thru " kitty"] to end ] dog: [ [thru "dog " | thru " dog" | thru "mutt " | thru " mutt"] to end ] sentence: "I have a dog and a cat" print (parse sentence cat) and (parse sentence dog) > TRUE sentence: "I have a mutt and a kitty" print (parse sentence cat) and (parse sentence dog) > TRUE sentence: "I just have a cat" print (parse sentence cat) and (parse sentence dog) > FALSE sentence: "I have a vacation dog" print (parse sentence cat) and (parse sentence dog) > FALSE You could, of course, get alot fancier with your patterns. -----Original Message----- From: Jelinek, Michael Sent: Monday, March 27, 2000 4:02 PM To: '[EMAIL PROTECTED]' Subject: RE: [REBOL] Newbie question #2 - Pattern making and using? Re:(8) 'parse does just what the REBOL doc says: pattern matching. True, it doesn't do everything (nothing does), but I don't think it will do what you want. You want to split the sentence up into "words", then match those (whole) words. This is a little more than just matching patterns. To match english words, you have to first parse those words out of the sentence (you can use 'parse for this), then match against those (whole) words. 'parse doesn't match against the whole words; 'parse will match any substring of each word. So, I don't think 'parse is all you are looking for. My guess is that you will need a combination of 'parse, and a loop around a 'find. You could always write a REBOL dialect for your purpose. - Michael Jelinek
