[rules-users] Pattern matching rules
Mauricio Salatino
salaboy at gmail.com
Wed Jul 24 05:58:12 EDT 2013
yeah you can use the matches operator and write your own regular expression
there.
Cheers
On Wed, Jul 24, 2013 at 10:47 AM, rganesh84 <ganesh_r04 at infosys.com> wrote:
> I was just wondering if there is a pattern matcher available in drools.
> Below is a sample
>
> rule "Action Movies"
> dialect "java"
> when
> ui : UserInfo(likes contains "Action")
> then
> List sw = new ArrayList();
> sw.add("Die Hard");
> sw.add("The Avengers");
> ui.setRecs(sw);
> end
>
> the rule strictly checks for word "Action" but if the likes list contains
> "Action Movies" the rule won't get processed. Is there a pattern matching
> ability or a like search for a String/list containing strings?
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Pattern-matching-rules-tp4025112.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
>
--
- MyJourney @ http://salaboy.com <http://salaboy.wordpress.com>
- Co-Founder @ http://www.jugargentina.org
- Co-Founder @ http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130724/0f4c866e/attachment.html
More information about the rules-users
mailing list