Regex function


regex Boolean

regex (String input, String expr)

Tests the input string with the regular expression contained in expr. If the input string matches the expression, true is returned.

Parameters:

input - string to be matched against the expression

expr - the regular expression

Returns:

false if the regular expression does not match, or an object containing 'MATCHES' and an array 'GROUPS' with the results of the regular expression parsing.

Tip

Since RDL2 automatically converts unknown properties to false, a script can always use result. MATCHES and check for true or false, even though the regex function may not have set that property.

See Regular-Expressions for information on the syntax used in regular expressions.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*