As the Expert manual has it:
   a matches b
   a is any string, b is a string containing a regular expression

See java.util.regex.Pattern for more documentation.

The matches operator works via the method Matcher.matches, so looking for xyz anywhere in a string will require a pattern like ".*xyz.*".

-W


On 11 March 2012 12:18, shawn <youngxiao121@hotmail.com> wrote:
Hey there.
I get stuck on using matches operator. The Documentation doesn't say the
operator in details.
I just need to find whether String2 contains String1 (Ignore Case).
Now I have a key(String variable) and a value(String variable).
If I write key matches value, I know it definitely wrong. So is there anyone
knows how to write it?

Cheers.
Shawn

--
View this message in context: http://drools.46999.n3.nabble.com/matches-operator-tp3816492p3816492.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users