$eval (mfunct, parse-spec1, parse-spec2) function
This function performs a math function on two parsed numeric values. The mfunct argument is one of the following: sum, diff, div, mult, or mod.
This parse expression is useful in match expressions with conditional operators. For example, the expression $eval(mult, $3, count=*) gt 85 matches if the third word, multiplied by the value following count= value is greater than 85.
The following examples show target strings, parse expressions, and return values:
Target string | Parse expression | Return value |
---|---|---|
Add 40 to 60 | $eval (sum, $2, $4) | 100 |
Counts Total=30 during secs=3 time | $eval (div, total=*, secs=*) | 10 |
Counts Total=30 during 3 secs time | $eval (mult, total=*, $4) | 90 |
Related topic
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*