[rules-users] matches operator

Wolfgang Laun wolfgang.laun at gmail.com
Sun Mar 11 07:47:18 EDT 2012


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 at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120311/7f2d87fb/attachment.html 


More information about the rules-users mailing list