Thanks for reading this thread. Quick question about regular expressions: we are retrieving the regex as a string from a database, retrieving it and then we want to evaluate the value of a variable against it, in a labelled branch;
The problem is now that the IS will treat %/selectedRegEx% as a string, and is not evaluating it. So the branch will only work if the value of /selectedRegEx is “/stringToCompare”, which is obviously not what we want.
I’ve hit the same problem before (most recently on a 7.1.1 impl). It seems that evaluation of the label contents only occurs once - so once it has substituted the contents of variable selectedRegEx into the label, it’s done. No evaluation of the regular expression itself. This implies a single pass left to right evaluation of the label expression.
It sounds like you’ll need a Java service. Luckily, PSUtilities already has the service you need. Take a look at PSUtilities.regex:matches and see if it works for you.