<div>Thanks for your reply Edson. What if I want to test for multiple substrings in different strings?</div>
<div> </div>
<div>For example, how can I find beta in sentence2?<br></div>
<div>I tried to combine WrapperClass( sentence matches &quot;.*Alpha.*&quot; &amp;&amp; sentence2 matches &quot;.*Beta*.&quot;) but I got errors. <br></div>
<div>Thanks,</div>
<div>Armaghan</div>
<div> </div>
<div class="gmail_quote">2009/5/31 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>   If the string you are looking for is a substring of your sentence, you need to either use a regexp or an eval to call for an indexOf-like method:<br>
<br>WrapperClass( sentence matches &quot;.*Alpha.*&quot; )<br><br>   []s<br>   Edson<br><br>
<div class="gmail_quote">2009/5/31 Armaghan Mahmud <span dir="ltr">&lt;<a href="mailto:mahmud.armaghan@gmail.com" target="_blank">mahmud.armaghan@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div></div>
<div class="h5">
<div>Hey guys,</div>
<div> </div>
<div>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&#39;s my original code:</div>

<div> </div>
<div><font size="2">
<p align="left">rule &quot;Find Alpha in a sentence&quot;</p><u>
<p align="left">salience</p></u>100 
<p>wrap: WrapperClass(Sentence == &quot;Alpha&quot;)</p>
<p align="left">then </p>
<p>System.out.<u>println</u>(&quot;Aha found ya!&quot;);</p>
<p>end</p>
<p> </p>
<p> </p></font></div><br></div></div>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com/" target="_blank">www.jboss.com</a><br>
</font><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>
<br></blockquote></div><br>