<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Thanks for your response.</div><div><br></div><div>I don't think contains will work in this case. &nbsp;I need to match if a collection contains one, and only one, of another collection. &nbsp;So " ('a','b','c') contains one of ('a','b','e') " should not match, where "('a','b','c') contains ('a','2','3')" should match.</div><div><br></div><div>Thanks,</div><div>Dave Cracauer</div><br><div><div>On Aug 23, 2008, at 8:31 AM, Scott Burrows wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">You have the answer in your example, reserved word "contains" will give you that information.<br><br clear="all">Scott Burrows<br><br> <br><br><div class="gmail_quote">On Sat, Aug 23, 2008 at 9:23 AM, David Cracauer <span dir="ltr">&lt;<a href="mailto:dcracauer@earthlink.net">dcracauer@earthlink.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br> Hi,<br> I'm getting stuck on this and I'm hoping someone can help..<br> I need to be able to check that a collection contains one, and only one item<br> from another collection.<br> <br> Ideally, I would do something like this:<br> <br> &nbsp;a:Answer(responses contains one of ("a","b","c"));<br> <br> Is there a way do do this without resorting to evals or predicate<br> expressions? (drools 4.07)<br> <br> Thanks,<br> Dave<br> <font color="#888888"><br> <br> <br> --<br> View this message in context: <a href="http://www.nabble.com/Can-I-check-if-a-collection-contains-one%2C-and-only-one-item-of-another-collection-tp19114896p19114896.html" target="_blank">http://www.nabble.com/Can-I-check-if-a-collection-contains-one%2C-and-only-one-item-of-another-collection-tp19114896p19114896.html</a><br> Sent from the drools - user mailing list archive at Nabble.com.<br> <br> _______________________________________________<br> rules-users mailing list<br> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br> </font></blockquote></div><br></div> _______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></body></html>