[rules-users] checking string property for key-words
Wolfgang Laun
wolfgang.laun at gmail.com
Mon Mar 19 10:51:02 EDT 2012
Have you tried
subject matches ".*$1.*"
(A more sophisticated regex seems to be indicated, though.)
HTH
-W
On 19/03/2012, Frank Langelage <frank at lafr.de> wrote:
> Hello,
>
> I'm working on module checking and processing incoming mails.
> I'd like to use drools expert to check the mails and determine the
> target folder for the further processing.
>
> So one of the first things is to check the subject of mail for keywords.
> I'm using decision tables.
>
> The first shot was to use regular expressions for this.
> CONDITION ACTION
> javax.mail.Message
> subject matches "$1" insert(new String("$1"));
> .* [Ss]pam .* Spam
> .* Order .* Orders/inbox
> .* Activity .* Workflow/inbox
>
> This works so far, but I'm not totally happy with this regular expressions.
> I'd prefer to see only the key-word in the cells.
>
> CONDITION ACTION
> javax.mail.Message
> ??????????? insert(new String("$1"));
> spam Spam
> Spam Spam
> Order Orders/inbox
> Activity Workflow/inbox
>
> But what to fill in for the ????? ?
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list