[rules-users] String comparison question
Armaghan Mahmud
mahmud.armaghan at gmail.com
Sun May 31 21:54:56 EDT 2009
Hey guys,
I read in a previous post that == in Drools 4.0.7 maps to .equals()
automatically. My situation required me to put a String object into the
working memory and do a comparison on it to see if a particular word is in
the passed String sentence. Could anybody please guide me as to how to
approach this problem? Thanks in advance. Here's my original code:
rule "Find Alpha in a sentence"
*
salience* 100
wrap: WrapperClass(Sentence == "Alpha")
then
System.out.*println*("Aha found ya!");
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090531/547d135f/attachment.html
More information about the rules-users
mailing list