The second operand of matches is just another String expression, and
therefore it could be a string literal, a variable bound to a String field,
or a String expression.
For instance, this
$f1: Foo( $id1: id )
$f2: Foo( this != $f1, $id2: id matches ".*" + $id1 + ".*" )
is a test for $id2 being a substring of $id1.
Or you could do
$f1: Foo( $id1: id )
$f2: Foo( this != $f1, $id2: id matches ".*(" + $id1 + ")\\1.*" )
which tests - what?
-W
On 11 March 2012 17:39, shawn <youngxiao121(a)hotmail.com> wrote:
Thanks
--
View this message in context:
http://drools.46999.n3.nabble.com/matches-operator-tp3816492p3816900.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users