drools脚本中 matches 的用法

 

value matches ".*\\d.*"
rule "Example"
no-loop true
    when
        Var(key=="Example.Start",$startTime:time) 
        and not Var(key=="Example.End",value=="1") 
        and Var(key=="RoleNameIn",(value=="平原" || value=="隧道"|| value matches ".*\\d.*")) 
        and Var((key=="Example.JC.01" || key=="Eval.VoiceSpeech"),time>=$startTime,time>=$connectTime,$p1:time)
        and not Var(key=="Example.JC.02",time>$p1) 
    then
        Set("Example.JC.02","1");
        Set("Example.TK","1");
end

 

posted @ 2025-10-28 16:00  一步一个坑  阅读(2)  评论(0)    收藏  举报