rule "doesnot match REGEX"
when
RuleActivator( targetMessage == "message" )
$g: Parent(name matches "^[0-9]{4}[" "][A-Z]{2}[" "][0-9]{5}[" "]")
then
insert(new ValidationError(Validation($ROOT, $g, "name"), "SSDN"));
end
Currently this rule will be throw error when the regex will be matched. I want to throw error when this Regex doesnot match. So, is there any method in drools for it. Or there is some other way?