<div>The second operand of matches is just another String expression, and</div><div>therefore it could be a string literal, a variable bound to a String field,</div><div>or a String expression.</div><div><br></div><div>For instance, this </div>
<div><div>  $f1: Foo( $id1: id )  </div><div>  $f2: Foo( this != $f1, $id2: id matches &quot;.*&quot; + $id1 + &quot;.*&quot; )</div></div><div>is a test for $id2 being a substring of $id1.</div><div><br></div><div>Or you could do</div>
<div><div>  $f1: Foo( $id1: id )  </div><div>  $f2: Foo( this != $f1, $id2: id matches &quot;.*(&quot; + $id1 + &quot;)\\1.*&quot; )</div></div><div>which tests - what?</div><div><br></div><div>-W</div><br><br><div class="gmail_quote">
On 11 March 2012 17:39, 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">
Thanks<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/matches-operator-tp3816492p3816900.html" target="_blank">http://drools.46999.n3.nabble.com/matches-operator-tp3816492p3816900.html</a><br>
<div class="HOEnZb"><div class="h5">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>
</div></div></blockquote></div><br>