OpenRules allows non-technical users to easily compare different strings with certain values. Decision table conditions may use simple operators such as “Is”, “Is One Of”, “Starts With”, and “Contains”. There are also more powerful patterns matching operators such as “Like” and “Match”. In this post I will describe these useful operators.
The following decision table uses simple comparison operators:

As you may guess, the operator “Is” checks if the decision variable “Customer Profile” is “Gold”, and the operator “Is One Of” checks if it is one of “Bronze” or “Silver”. The operator “Starts With” checks if the variable starts with a certain sequence of characters. The operator “Contains” may check if it contains a certain sequence of characters. There are opposite operators “Is Not”, “Is Not one Of”, “Does Not Contains”.
However, frequently our customers need to compare a string variable with certain patterns and in these cases they use more powerful operator “Like ” and “Match”.
The operator “Like” is similar to the SQL LIKE operator as it checks if a decision variable matches simple patterns with two wildcards:
- The percent sign (%) represents zero, one, or multiple characters
- The underscore sign (_) represents one, single character.
For instance, operator “Like” with ‘A%X’ checks if the decision variable starts with “A” and ends with “X”. The operator “Like” with ‘__X%’ checks if the decision variable has “X” as the 3rd character.
The operator “Match” allows you to compare a string variable with any regular expression does not matter how complex it may be. Here are a few useful patterns:
- ^[1-9]\d{2}-\d{3}-\d{4} checks a standard US type phone number ###-###-#### like 732-993-3131
- (?!666|000|9\\d{2})\\d{3} checks a standard US Social Security Number like 123-057-7723 : the first 3 digits should not start with 000, 666, or between 900 and 999
- ^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$ checks a valid email address
You may find many more good while simple pattern examples here.
All the above operators are case insensitive.