<div>As the Expert manual has it:</div>   a matches b<div>   a is any string, b is a string containing a regular expression</div><div><br></div><div>See java.util.regex.Pattern for more documentation.</div><div><br></div><div>
The matches operator works via the method Matcher.matches, so looking for xyz anywhere in a string will require a pattern like &quot;.*xyz.*&quot;.</div><div><br></div><div>-W</div><div><br><br><div class="gmail_quote">On 11 March 2012 12:18, shawn <span dir="ltr">&lt;<a href="mailto:youngxiao121@hotmail.com">youngxiao121@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey there.<br>
I get stuck on using matches operator. The Documentation doesn&#39;t say the<br>
operator in details.<br>
I just need to find whether String2 contains String1 (Ignore Case).<br>
Now I have a key(String variable) and a value(String variable).<br>
If I write key matches value, I know it definitely wrong. So is there anyone<br>
knows how to write it?<br>
<br>
Cheers.<br>
Shawn<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/matches-operator-tp3816492p3816492.html" target="_blank">http://drools.46999.n3.nabble.com/matches-operator-tp3816492p3816492.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<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>
</blockquote></div><br></div>