Nope .. it doesn’t work either….
From:
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Sarika Khamitkar
Sent: Friday, July 13, 2007 5:06
PM
To: Rules Users List
Subject: RE: [rules-users]
negation for matches
You can try:
$s : SupplierView(suppCode not matches "\\d\\d.*")
From:
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Manukyan, Sergey
Sent: Friday, July 13, 2007 4:49
PM
To: Rules Users List
Subject: [rules-users] negation
for matches
Folks,
How can I negate the matches?, like for those that don’t match certain criteria do that
I tried something like this but it doesn’t work:
rule "SupplierView: Supplier code's first two characters should be numeric."
when
$s : SupplierView(!(suppCode matches "\\d\\d.*"))
then
ValidationErrorFacade.getInstance().registerError($s, new ValidationError("Supplier code's first two characters should be numeric."));
end
Thanks,
-Sergey