2 Replies Latest reply on Oct 4, 2007 6:30 AM by toby saville

    CBR Using Regular Expressions

    toby saville Novice


      Are there any merits behind having a regular expression equality test as part of the XPath value matching, alongside xpathEquals? I have a rule set where a number of different values result in the same service being called. I know this can be achieved with multiple xpathEquals statements, but a single one may be a bit clearer.


        • 1. Re: CBR Using Regular Expressions
          Burr Sutter Master

          I've been thinking about this as well. Perhaps we should just have a CBR action based on Regex. Or are you proposing we update the XPath DSL in the Drools-based CBR to have regex?

          What do you think?


          • 2. Re: CBR Using Regular Expressions
            toby saville Novice

            I guess if there are a lot of regular expression related functions, a new action could be created. However, from my understanding of reg exps, you should only need to perform the matches function against it, unless you want to build patterns from message content or similar.

            I was simply thinking of updating the drools based CBR action to include another function for matching a reg exp against the value of a DOM node or attribute.