Have you tried
subject matches ".*$1.*"
(A more sophisticated regex seems to be indicated, though.)
HTH
-W
On 19/03/2012, Frank Langelage <frank(a)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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users